Amazon Linux 2023とAmazon Linux2のデフォルトで起動しているサービスやインストールされているパッケージを比較してみた

Amazon Linux 2023とAmazon Linux2のデフォルトで起動しているサービスやインストールされているパッケージを比較してみた

Amazon Linux 2023を使う場合はどのようなパッケージがインストールされているか把握しよう
Clock Icon2023.03.22

この記事は公開されてから1年以上経過しています。情報が古い可能性がありますので、ご注意ください。

Amazon Linux 2023とAmazon Linux2のデフォルトで起動しているサービスやインストールされているパッケージに違いがあるか気になるな

こんにちは、のんピ(@non____97)です。

Amazon Linux 2023がGAされましたね。

こちらの記事でも紹介した通り、Amazon Linux 2023とAmazon Linux 2とを比較して、リポジトリに追加・削除されたパッケージが相当数あります。

どのパッケージが追加・削除されたかはAWS公式ドキュメントから判断つきますが、どのサービスがデフォルトで起動していて、どのパッケージがインストールされているかの情報はありません。

気になったのでAmazon Linux 2023とAmazon Linux2のデフォルトで起動しているサービスやインストールされているパッケージを比較してみます。

検証で使用するAMIは以下の通りです。

  • Amazon Linux 2 : amzn2-ami-kernel-5.10-hvm-2.0.20230307.0-x86_64-gp2(ami-005f9685cb30f234b)
  • Amazon Linux 2023 : al2023-ami-2023.0.20230315.0-kernel-6.1-x86_64(ami-02f3f602d23f1659d)

いきなりまとめ

  • Amazon Linux 2023を使う場合はどのようなパッケージがインストールされているか把握しよう
  • 個人的に気になるAmazon Linux 2023にインストールされていないパッケージは以下
    • rsyslog
    • cronie
    • iptables
    • make
    • lvm2

デフォルトで起動しているサービスの比較

Amazon Linux 2でデフォルトで起動しているサービス

Amazon Linux 2でデフォルトで起動しているサービスは以下の通りです。

$ sudo systemctl list-units --type=service | awk '$1 ~ /service$/ {printf "%-50s %7s\n",$1, $3}'
acpid.service                                       active
amazon-ssm-agent.service                            active
atd.service                                         active
auditd.service                                      active
chronyd.service                                     active
cloud-config.service                                active
cloud-final.service                                 active
cloud-init-local.service                            active
cloud-init.service                                  active
crond.service                                       active
dbus.service                                        active
[email protected]                                  active
gssproxy.service                                    active
irqbalance.service                                  active
kmod-static-nodes.service                           active
libstoragemgmt.service                              active
lvm2-lvmetad.service                                active
lvm2-monitor.service                                active
network.service                                     active
postfix.service                                     active
rhel-dmesg.service                                  active
rhel-domainname.service                             active
rhel-readonly.service                               active
rngd-wake-threshold.service                         active
rngd.service                                        active
rpcbind.service                                     active
rsyslog.service                                     active
[email protected]                          active
sshd.service                                        active
sysstat.service                                     active
systemd-fsck-root.service                           active
systemd-journal-flush.service                       active
systemd-journald.service                            active
systemd-logind.service                              active
systemd-modules-load.service                        active
systemd-random-seed.service                         active
systemd-remount-fs.service                          active
systemd-sysctl.service                              active
systemd-tmpfiles-setup-dev.service                  active
systemd-tmpfiles-setup.service                      active
systemd-udev-settle.service                         active
systemd-udev-trigger.service                        active
systemd-udevd.service                               active
systemd-update-utmp.service                         active
systemd-user-sessions.service                       active
systemd-vconsole-setup.service                      active
update-motd.service                                 active

Amazon Linux 2023でデフォルトで起動しているサービス

Amazon Linux 2023でデフォルトで起動しているサービスは以下の通りです。

$ sudo systemctl list-units --type=service | awk '$1 ~ /service$/ {printf "%-50s %7s\n",$1, $3}'
acpid.service                                       active
amazon-ssm-agent.service                            active
atd.service                                         active
auditd.service                                      active
chronyd.service                                     active
cloud-config.service                                active
cloud-final.service                                 active
cloud-init-local.service                            active
cloud-init.service                                  active
dbus-broker.service                                 active
dracut-shutdown.service                             active
[email protected]                                  active
gssproxy.service                                    active
irqbalance.service                                  active
kmod-static-nodes.service                           active
libstoragemgmt.service                              active
[email protected]                          active
rngd.service                                        active
rpc-statd-notify.service                            active
[email protected]                          active
sshd.service                                        active
sssd.service                                        active
sysstat.service                                     active
systemd-fsck-root.service                           active
systemd-journal-flush.service                       active
systemd-journald.service                            active
systemd-logind.service                              active
systemd-network-generator.service                   active
systemd-networkd-wait-online.service                active
systemd-networkd.service                            active
systemd-random-seed.service                         active
systemd-remount-fs.service                          active
systemd-resolved.service                            active
systemd-sysctl.service                              active
systemd-tmpfiles-setup-dev.service                  active
systemd-tmpfiles-setup.service                      active
systemd-udev-trigger.service                        active
systemd-udevd.service                               active
systemd-update-utmp.service                         active
systemd-user-sessions.service                       active
systemd-userdbd.service                             active
[email protected]                       active
[email protected]                                   active

デフォルトで起動しているサービスの比較

各OSの出力結果をファイルに保存してdiffします。

>  diff AL2_services.log AL2023_services.log -u -U 0
--- AL2_services.log	2023-03-20 18:08:38
+++ AL2023_services.log	2023-03-20 18:08:43
@@ -11,2 +11,2 @@
-crond.service                                       active
-dbus.service                                        active
+dbus-broker.service                                 active
+dracut-shutdown.service                             active
@@ -18,8 +18 @@
-lvm2-lvmetad.service                                active
-lvm2-monitor.service                                active
-network.service                                     active
-postfix.service                                     active
-rhel-dmesg.service                                  active
-rhel-domainname.service                             active
-rhel-readonly.service                               active
-rngd-wake-threshold.service                         active
[email protected]                          active
@@ -27,2 +20 @@
-rpcbind.service                                     active
-rsyslog.service                                     active
+rpc-statd-notify.service                            active
@@ -30,0 +23 @@
+sssd.service                                        active
@@ -36 +29,3 @@
-systemd-modules-load.service                        active
+systemd-network-generator.service                   active
+systemd-networkd-wait-online.service                active
+systemd-networkd.service                            active
@@ -38,0 +34 @@
+systemd-resolved.service                            active
@@ -42 +37,0 @@
-systemd-udev-settle.service                         active
@@ -47,2 +42,3 @@
-systemd-vconsole-setup.service                      active
-update-motd.service                                 active
\ No newline at end of file
+systemd-userdbd.service                             active
[email protected]                       active
[email protected]                                   active
\ No newline at end of file

結果は以下の通りです。

Amazon Linux 2のみで起動しているサービス

サービス名 説明
crond.service バックグラウンドで定期的にタスクを実行するためのデーモンを管理するサービス
dbus.service プロセス間通信を可能にするシステムバスを提供するサービス
lvm2-lvmetad.service LVM2のメタデータを処理するサービス
lvm2-monitor.service LVM2の監視と自動再構成を行うサービス
network.service ネットワークの起動・停止と各種ネットワークサービスを制御するサービス
postfix.service MTA
rhel-dmesg.service RHELにおいてシステムの起動時に表示されるデバッグメッセージを制御するサービス
rhel-domainname.service RHELにおいてドメイン名を設定するサービス
rhel-readonly.service RHELにおいてシステムを読み取り専用モードで起動するためのサービス
rngd-wake-threshold.service システムのエントロピーが低下した場合に、rngdを起動してエントロピーを回復させるためのサービス
rpcbind.service RPCに必要なポートマッピングを提供するサービス
rsyslog.service ログの収集や処理、保存を行うためのシステムログデーモンを提供するサービス
systemd-modules-load.service システムのカーネルモジュールを読み込むサービス
systemd-udev-settle.service システムに接続されたハードウェアデバイスを検出してドライバーをロードするサービス
systemd-vconsole-setup.service システムの仮想コンソールを設定するサービス
update-motd.service ログイン時に表示されるメッセージを更新するためのサービス

Amazon Linux 2023のみで起動しているサービス

サービス名 説明
dbus-broker.service プロセス間通信を可能にするシステムバスを提供するサービス
dracut-shutdown.service シャットダウン時にルートファイルシステムを安全にアンマウントするサービス
policy-routes.service ポリシールーティングを設定するサービス
rpc-statd-notify.service NFSサーバーとクライアント間で状態の通知を行うサービス
sssd.service 認証やID管理を行うためのサービス
systemd-network-generator.service systemd-networkdの設定ファイルを生成するサービス
systemd-networkd-wait-online.service systemd-networkdによって設定されたすべてのネットワーク接続がオンラインになるまで待機するサービス
systemd-networkd.service ネットワークの設定と管理を行うサービス
systemd-resolved.service DNSリゾルバー
systemd-userdbd.service ユーザーデータベースマネージャー
[email protected] ユーザーID 1000 (ec2-user) のランタイムディレクトリを管理するサービス
[email protected] ユーザーID 1000 (ec2-user) のマネージャー

特に気になるのはcrond.servicersyslog.serviceがAmazon Linux 2023ではデフォルトではインストールされていないことでしょうか。

rsyslog がインストールされていない問題

rsyslog.serviceについてはFedora 20でデフォルトでインストールされなくなったようです。

これはAmazon Linux 2023はFedora 34, 35, 36をベースにしているので、Amazon Linux 2023でもインストールされていないようです。なお、標準リポジトリで提供はされているためインストールすることは可能です。

# rsyslogがインストールされているか確認
$ rpm -qa | grep rsyslog

# rsyslogのパッケージが標準リポジトリで提供されているか確認
$ dnf list rsyslog
Amazon Linux 2023 repository                                                36 MB/s |  11 MB     00:00
Amazon Linux 2023 Kernel Livepatch repository                              955 kB/s | 155 kB     00:00
Available Packages
rsyslog.x86_64                             8.2204.0-3.amzn2023.0.2                              amazonlinux

# rsyslogの設定ファイルがないことも確認
$ ls -l /etc/rsyslog.conf
ls: cannot access '/etc/rsyslog.conf': No such file or directory

rsyslogがインストールされていないため、以下ログが出力されていません。

  • /var/log/messages
  • /var/log/secure
  • /var/log/maillog
  • /var/log/cron
  • /var/log/boot.log

/var/log配下は以下のようになっています。

$ ls -l /var/log
total 1580
lrwxrwxrwx. 1 root   root                39 Mar 13 23:36 README -> ../../usr/share/doc/systemd/README.logs
drwxr-xr-x. 3 root   root                48 Mar 20 05:20 amazon
drwx------. 2 root   root                23 Mar 20 05:19 audit
-rw-rw----. 1 root   utmp                 0 Mar 13 23:36 btmp
drwxr-x---. 2 chrony chrony              72 Mar 20 05:20 chrony
-rw-r-----. 1 root   adm               8767 Mar 21 04:10 cloud-init-output.log
-rw-r--r--. 1 root   adm             370084 Mar 21 04:10 cloud-init.log
-rw-r--r--. 1 root   root            841162 Mar 21 04:10 dnf.librepo.log
-rw-r--r--. 1 root   root            263729 Mar 21 04:10 dnf.log
-rw-r--r--. 1 root   root             80517 Mar 21 04:10 dnf.rpm.log
-rw-r--r--. 1 root   root              2479 Mar 21 04:10 hawkey.log
drwxr-sr-x+ 3 root   systemd-journal     46 Mar 20 05:19 journal
-rw-rw-r--. 1 root   utmp            292292 Mar 21 04:11 lastlog
drwx------. 2 root   root                 6 Mar 13 23:36 private
drwxr-xr-x. 2 root   root                30 Mar 21 04:10 sa
drwxr-x---. 2 root   root                73 Mar 20 05:19 sssd
-rw-------. 1 root   root                 0 Mar 13 23:36 tallylog
-rw-rw-r--. 1 root   utmp              8832 Mar 21 04:11 wtmp

「ログが確認できなくて困る」と思われるかもしれません。しかし、journalが出力されているため、journalctlで確認することができます。

# journalのステータス確認
$ systemctl status systemd-journald
● systemd-journald.service - Journal Service
     Loaded: loaded (/usr/lib/systemd/system/systemd-journald.service; static)
     Active: active (running) since Tue 2023-03-21 04:10:29 UTC; 34min ago
TriggeredBy: ● systemd-journald.socket
             ● systemd-journald-audit.socket
             ● systemd-journald-dev-log.socket
       Docs: man:systemd-journald.service(8)
             man:journald.conf(5)
   Main PID: 756 (systemd-journal)
     Status: "Processing requests..."
      Tasks: 1 (limit: 1071)
     Memory: 12.1M
        CPU: 258ms
     CGroup: /system.slice/systemd-journald.service
             └─756 /usr/lib/systemd/systemd-journald

Mar 21 04:10:29 ip-172-31-10-89.ec2.internal systemd-journald[756]: Journal started
Mar 21 04:10:29 ip-172-31-10-89.ec2.internal systemd-journald[756]: Runtime Journal (/run/log/journal/ec2066ee68960d99f827ed2836aafa9e) is 2.3M, max 18.3M, 16.0M free.
Mar 21 04:10:29 ip-172-31-10-89.ec2.internal systemd[1]: systemd-journald.service: Deactivated successfully.
Mar 21 04:10:29 ip-172-31-10-89.ec2.internal systemd-journald[756]: Time spent on flushing to /var/log/journal/ec2066ee68960d99f827ed2836aafa9e is 81.110ms for 692 entries.
Mar 21 04:10:29 ip-172-31-10-89.ec2.internal systemd-journald[756]: System Journal (/var/log/journal/ec2066ee68960d99f827ed2836aafa9e) is 24.0M, max 811.6M, 787.6M free.
Mar 21 04:10:29 ip-172-31-10-89.ec2.internal systemd-journald[756]: Received client request to flush runtime journal.

# journalが出力されていることを確認
$ ls -l /var/log/journal/ec2066ee68960d99f827ed2836aafa9e
total 24580
-rw-r-----+ 1 root systemd-journal 8388608 Mar 21 04:46 system.journal
-rw-r-----+ 1 root systemd-journal 8388608 Mar 21 04:46 user-1000.journal
-rw-r-----+ 1 root systemd-journal 8388608 Mar 20 08:56 user-1001.journal

# journalの確認
$ journalctl | head
Mar 20 05:19:43 localhost kernel: Linux version 6.1.15-28.43.amzn2023.x86_64 (mockbuild@ip-10-0-52-220) (gcc (GCC) 11.3.1 20221121 (Red Hat 11.3.1-4), GNU ld version 2.39-6.amzn2023.0.5) #1 SMP PREEMPT_DYNAMIC Thu Mar  9 17:17:35 UTC 2023
Mar 20 05:19:43 localhost kernel: Command line: BOOT_IMAGE=(hd0,gpt1)/boot/vmlinuz-6.1.15-28.43.amzn2023.x86_64 root=UUID=7efef47b-a4f8-4b90-9504-8196067a31b6 ro console=tty0 console=ttyS0,115200n8 nvme_core.io_timeout=4294967295 rd.emergency=poweroff rd.shell=0 selinux=1 security=selinux quiet
Mar 20 05:19:43 localhost kernel: KASLR enabled
Mar 20 05:19:43 localhost kernel: x86/fpu: Supporting XSAVE feature 0x001: 'x87 floating point registers'
Mar 20 05:19:43 localhost kernel: x86/fpu: Supporting XSAVE feature 0x002: 'SSE registers'
Mar 20 05:19:43 localhost kernel: x86/fpu: Supporting XSAVE feature 0x004: 'AVX registers'
Mar 20 05:19:43 localhost kernel: x86/fpu: Supporting XSAVE feature 0x008: 'MPX bounds registers'
Mar 20 05:19:43 localhost kernel: x86/fpu: Supporting XSAVE feature 0x010: 'MPX CSR'
Mar 20 05:19:43 localhost kernel: x86/fpu: Supporting XSAVE feature 0x020: 'AVX-512 opmask'
Mar 20 05:19:43 localhost kernel: x86/fpu: Supporting XSAVE feature 0x040: 'AVX-512 Hi256'

journalを確認することができました。

また、journalはデフォルトで/var/log/journal配下に出力しているようですね。

journalctlだと全てのユニットやkernelなどのログが出力されます。その場合は、各種オプションを指定してあげます。

# sshd.serviceのログ
$ journalctl -u sshd
Mar 20 05:19:52 ip-172-31-10-89.ec2.internal systemd[1]: Starting sshd.service - OpenSSH server daemon...
Mar 20 05:19:53 ip-172-31-10-89.ec2.internal sshd[1490]: Server listening on 0.0.0.0 port 22.
Mar 20 05:19:53 ip-172-31-10-89.ec2.internal sshd[1490]: Server listening on :: port 22.
Mar 20 05:19:53 ip-172-31-10-89.ec2.internal systemd[1]: Started sshd.service - OpenSSH server daemon.
Mar 20 05:19:53 ip-172-31-10-89.ec2.internal systemd[1]: Stopping sshd.service - OpenSSH server daemon...
Mar 20 05:19:53 ip-172-31-10-89.ec2.internal sshd[1490]: Received signal 15; terminating.
Mar 20 05:19:53 ip-172-31-10-89.ec2.internal systemd[1]: sshd.service: Deactivated successfully.
Mar 20 05:19:53 ip-172-31-10-89.ec2.internal systemd[1]: Stopped sshd.service - OpenSSH server daemon.
Mar 20 05:19:53 ip-172-31-10-89.ec2.internal systemd[1]: Starting sshd.service - OpenSSH server daemon...
Mar 20 05:19:53 ip-172-31-10-89.ec2.internal sshd[1503]: Server listening on 0.0.0.0 port 22.
Mar 20 05:19:53 ip-172-31-10-89.ec2.internal sshd[1503]: Server listening on :: port 22.
Mar 20 05:19:53 ip-172-31-10-89.ec2.internal systemd[1]: Started sshd.service - OpenSSH server daemon.
Mar 20 06:17:59 ip-172-31-10-89.ec2.internal systemd[1]: Stopping sshd.service - OpenSSH server daemon...
Mar 20 06:17:59 ip-172-31-10-89.ec2.internal sshd[1503]: Received signal 15; terminating.
Mar 20 06:17:59 ip-172-31-10-89.ec2.internal systemd[1]: sshd.service: Deactivated successfully.
Mar 20 06:17:59 ip-172-31-10-89.ec2.internal systemd[1]: Stopped sshd.service - OpenSSH server daemon.
-- Boot be4da1d27efa44e0bcfbc2299a6bd954 --
Mar 20 08:34:53 ip-172-31-10-89.ec2.internal systemd[1]: Starting sshd.service - OpenSSH server daemon...
Mar 20 08:34:53 ip-172-31-10-89.ec2.internal sshd[1468]: Server listening on 0.0.0.0 port 22.
Mar 20 08:34:53 ip-172-31-10-89.ec2.internal sshd[1468]: Server listening on :: port 22.
Mar 20 08:34:53 ip-172-31-10-89.ec2.internal systemd[1]: Started sshd.service - OpenSSH server daemon.
Mar 20 08:35:50 ip-172-31-10-89.ec2.internal sshd[1537]: Accepted publickey for ec2-user from <SSHクライアントのIPアドレス> >
Mar 20 08:35:50 ip-172-31-10-89.ec2.internal sshd[1537]: pam_unix(sshd:session): session opened for user e>
Mar 20 10:29:39 ip-172-31-10-89.ec2.internal systemd[1]: Stopping sshd.service - OpenSSH server daemon...
Mar 20 10:29:39 ip-172-31-10-89.ec2.internal sshd[1468]: Received signal 15; terminating.
Mar 20 10:29:39 ip-172-31-10-89.ec2.internal systemd[1]: sshd.service: Deactivated successfully.
Mar 20 10:29:39 ip-172-31-10-89.ec2.internal systemd[1]: Stopped sshd.service - OpenSSH server daemon.
-- Boot a0c1bbba59c847bc8c4d27c1a7353623 --
Mar 21 04:10:33 ip-172-31-10-89.ec2.internal systemd[1]: Starting sshd.service - OpenSSH server daemon...
Mar 21 04:10:33 ip-172-31-10-89.ec2.internal sshd[1473]: Server listening on 0.0.0.0 port 22.
Mar 21 04:10:33 ip-172-31-10-89.ec2.internal sshd[1473]: Server listening on :: port 22.
Mar 21 04:10:33 ip-172-31-10-89.ec2.internal systemd[1]: Started sshd.service - OpenSSH server daemon.
Mar 21 04:11:28 ip-172-31-10-89.ec2.internal sshd[1543]: Accepted publickey for ec2-user from <SSHクライアントのIPアドレス> >
Mar 21 04:11:28 ip-172-31-10-89.ec2.internal sshd[1543]: pam_unix(sshd:session): session opened for user e>

# kernelのログ
$ journalctl -k
Mar 21 04:10:26 localhost kernel: Linux version 6.1.15-28.43.amzn2023.x86_64 (mockbuild@ip-10-0-52-220) (g>
Mar 21 04:10:26 localhost kernel: Command line: BOOT_IMAGE=(hd0,gpt1)/boot/vmlinuz-6.1.15-28.43.amzn2023.x>
Mar 21 04:10:26 localhost kernel: KASLR enabled
Mar 21 04:10:26 localhost kernel: x86/fpu: Supporting XSAVE feature 0x001: 'x87 floating point registers'
Mar 21 04:10:26 localhost kernel: x86/fpu: Supporting XSAVE feature 0x002: 'SSE registers'
Mar 21 04:10:26 localhost kernel: x86/fpu: Supporting XSAVE feature 0x004: 'AVX registers'
Mar 21 04:10:26 localhost kernel: x86/fpu: Supporting XSAVE feature 0x008: 'MPX bounds registers'
Mar 21 04:10:26 localhost kernel: x86/fpu: Supporting XSAVE feature 0x010: 'MPX CSR'
Mar 21 04:10:26 localhost kernel: x86/fpu: Supporting XSAVE feature 0x020: 'AVX-512 opmask'
Mar 21 04:10:26 localhost kernel: x86/fpu: Supporting XSAVE feature 0x040: 'AVX-512 Hi256'
Mar 21 04:10:26 localhost kernel: x86/fpu: Supporting XSAVE feature 0x080: 'AVX-512 ZMM_Hi256'
Mar 21 04:10:26 localhost kernel: x86/fpu: Supporting XSAVE feature 0x200: 'Protection Keys User registers'
Mar 21 04:10:26 localhost kernel: x86/fpu: xstate_offset[2]:  576, xstate_sizes[2]:  256
Mar 21 04:10:26 localhost kernel: x86/fpu: xstate_offset[3]:  832, xstate_sizes[3]:   64
Mar 21 04:10:26 localhost kernel: x86/fpu: xstate_offset[4]:  896, xstate_sizes[4]:   64
Mar 21 04:10:26 localhost kernel: x86/fpu: xstate_offset[5]:  960, xstate_sizes[5]:   64
Mar 21 04:10:26 localhost kernel: x86/fpu: xstate_offset[6]: 1024, xstate_sizes[6]:  512
Mar 21 04:10:26 localhost kernel: x86/fpu: xstate_offset[7]: 1536, xstate_sizes[7]: 1024
Mar 21 04:10:26 localhost kernel: x86/fpu: xstate_offset[9]: 2560, xstate_sizes[9]:    8
Mar 21 04:10:26 localhost kernel: x86/fpu: Enabled xstate features 0x2ff, context size is 2568 bytes, usin>
Mar 21 04:10:26 localhost kernel: signal: max sigframe size: 3632
Mar 21 04:10:26 localhost kernel: BIOS-provided physical RAM map:
Mar 21 04:10:26 localhost kernel: BIOS-e820: [mem 0x0000000000000000-0x000000000009ffff] usable
Mar 21 04:10:26 localhost kernel: BIOS-e820: [mem 0x0000000000100000-0x00000000310cdfff] usable
Mar 21 04:10:26 localhost kernel: BIOS-e820: [mem 0x00000000310ce000-0x000000003134dfff] reserved
Mar 21 04:10:26 localhost kernel: BIOS-e820: [mem 0x000000003134e000-0x000000003135dfff] ACPI data
Mar 21 04:10:26 localhost kernel: BIOS-e820: [mem 0x000000003135e000-0x00000000313ddfff] ACPI NVS
Mar 21 04:10:26 localhost kernel: BIOS-e820: [mem 0x00000000313de000-0x000000003d37bfff] usable
Mar 21 04:10:26 localhost kernel: BIOS-e820: [mem 0x000000003d37c000-0x000000003d3fffff] reserved
Mar 21 04:10:26 localhost kernel: NX (Execute Disable) protection: active
Mar 21 04:10:26 localhost kernel: e820: update [mem 0x2f2be018-0x2f2c6e57] usable ==> usable
Mar 21 04:10:26 localhost kernel: e820: update [mem 0x2f2be018-0x2f2c6e57] usable ==> usable
Mar 21 04:10:26 localhost kernel: extended physical RAM map:
Mar 21 04:10:26 localhost kernel: reserve setup_data: [mem 0x0000000000000000-0x000000000009ffff] usable
Mar 21 04:10:26 localhost kernel: reserve setup_data: [mem 0x0000000000100000-0x000000002f2be017] usable
Mar 21 04:10:26 localhost kernel: reserve setup_data: [mem 0x000000002f2be018-0x000000002f2c6e57] usable
Mar 21 04:10:26 localhost kernel: reserve setup_data: [mem 0x000000002f2c6e58-0x00000000310cdfff] usable
Mar 21 04:10:26 localhost kernel: reserve setup_data: [mem 0x00000000310ce000-0x000000003134dfff] reserved
Mar 21 04:10:26 localhost kernel: reserve setup_data: [mem 0x000000003134e000-0x000000003135dfff] ACPI data
Mar 21 04:10:26 localhost kernel: reserve setup_data: [mem 0x000000003135e000-0x00000000313ddfff] ACPI NVS
Mar 21 04:10:26 localhost kernel: reserve setup_data: [mem 0x00000000313de000-0x000000003d37bfff] usable
Mar 21 04:10:26 localhost kernel: reserve setup_data: [mem 0x000000003d37c000-0x000000003d3fffff] reserved
Mar 21 04:10:26 localhost kernel: efi: EFI v2.70 by EDK II
Mar 21 04:10:26 localhost kernel: efi: SMBIOS=0x3126a000 ACPI=0x3135d000 ACPI 2.0=0x3135d014 MEMATTR=0x2fa>
Mar 21 04:10:26 localhost kernel: SMBIOS 2.7 present.

# 直近起動時のログ
$ journalctl -b
Mar 21 04:10:26 localhost kernel: Linux version 6.1.15-28.43.amzn2023.x86_64 (mockbuild@ip-10-0-52-220) (g>
Mar 21 04:10:26 localhost kernel: Command line: BOOT_IMAGE=(hd0,gpt1)/boot/vmlinuz-6.1.15-28.43.amzn2023.x>
Mar 21 04:10:26 localhost kernel: KASLR enabled
Mar 21 04:10:26 localhost kernel: x86/fpu: Supporting XSAVE feature 0x001: 'x87 floating point registers'
Mar 21 04:10:26 localhost kernel: x86/fpu: Supporting XSAVE feature 0x002: 'SSE registers'
Mar 21 04:10:26 localhost kernel: x86/fpu: Supporting XSAVE feature 0x004: 'AVX registers'
Mar 21 04:10:26 localhost kernel: x86/fpu: Supporting XSAVE feature 0x008: 'MPX bounds registers'
Mar 21 04:10:26 localhost kernel: x86/fpu: Supporting XSAVE feature 0x010: 'MPX CSR'
Mar 21 04:10:26 localhost kernel: x86/fpu: Supporting XSAVE feature 0x020: 'AVX-512 opmask'
Mar 21 04:10:26 localhost kernel: x86/fpu: Supporting XSAVE feature 0x040: 'AVX-512 Hi256'
Mar 21 04:10:26 localhost kernel: x86/fpu: Supporting XSAVE feature 0x080: 'AVX-512 ZMM_Hi256'
Mar 21 04:10:26 localhost kernel: x86/fpu: Supporting XSAVE feature 0x200: 'Protection Keys User registers'
Mar 21 04:10:26 localhost kernel: x86/fpu: xstate_offset[2]:  576, xstate_sizes[2]:  256
Mar 21 04:10:26 localhost kernel: x86/fpu: xstate_offset[3]:  832, xstate_sizes[3]:   64
Mar 21 04:10:26 localhost kernel: x86/fpu: xstate_offset[4]:  896, xstate_sizes[4]:   64
Mar 21 04:10:26 localhost kernel: x86/fpu: xstate_offset[5]:  960, xstate_sizes[5]:   64
Mar 21 04:10:26 localhost kernel: x86/fpu: xstate_offset[6]: 1024, xstate_sizes[6]:  512
Mar 21 04:10:26 localhost kernel: x86/fpu: xstate_offset[7]: 1536, xstate_sizes[7]: 1024
Mar 21 04:10:26 localhost kernel: x86/fpu: xstate_offset[9]: 2560, xstate_sizes[9]:    8
Mar 21 04:10:26 localhost kernel: x86/fpu: Enabled xstate features 0x2ff, context size is 2568 bytes, usin>
Mar 21 04:10:26 localhost kernel: signal: max sigframe size: 3632
Mar 21 04:10:26 localhost kernel: BIOS-provided physical RAM map:
Mar 21 04:10:26 localhost kernel: BIOS-e820: [mem 0x0000000000000000-0x000000000009ffff] usable
Mar 21 04:10:26 localhost kernel: BIOS-e820: [mem 0x0000000000100000-0x00000000310cdfff] usable
Mar 21 04:10:26 localhost kernel: BIOS-e820: [mem 0x00000000310ce000-0x000000003134dfff] reserved
Mar 21 04:10:26 localhost kernel: BIOS-e820: [mem 0x000000003134e000-0x000000003135dfff] ACPI data
Mar 21 04:10:26 localhost kernel: BIOS-e820: [mem 0x000000003135e000-0x00000000313ddfff] ACPI NVS
Mar 21 04:10:26 localhost kernel: BIOS-e820: [mem 0x00000000313de000-0x000000003d37bfff] usable
Mar 21 04:10:26 localhost kernel: BIOS-e820: [mem 0x000000003d37c000-0x000000003d3fffff] reserved
Mar 21 04:10:26 localhost kernel: NX (Execute Disable) protection: active
Mar 21 04:10:26 localhost kernel: e820: update [mem 0x2f2be018-0x2f2c6e57] usable ==> usable
Mar 21 04:10:26 localhost kernel: e820: update [mem 0x2f2be018-0x2f2c6e57] usable ==> usable
Mar 21 04:10:26 localhost kernel: extended physical RAM map:
Mar 21 04:10:26 localhost kernel: reserve setup_data: [mem 0x0000000000000000-0x000000000009ffff] usable
Mar 21 04:10:26 localhost kernel: reserve setup_data: [mem 0x0000000000100000-0x000000002f2be017] usable
Mar 21 04:10:26 localhost kernel: reserve setup_data: [mem 0x000000002f2be018-0x000000002f2c6e57] usable
Mar 21 04:10:26 localhost kernel: reserve setup_data: [mem 0x000000002f2c6e58-0x00000000310cdfff] usable
Mar 21 04:10:26 localhost kernel: reserve setup_data: [mem 0x00000000310ce000-0x000000003134dfff] reserved
Mar 21 04:10:26 localhost kernel: reserve setup_data: [mem 0x000000003134e000-0x000000003135dfff] ACPI data
Mar 21 04:10:26 localhost kernel: reserve setup_data: [mem 0x000000003135e000-0x00000000313ddfff] ACPI NVS
Mar 21 04:10:26 localhost kernel: reserve setup_data: [mem 0x00000000313de000-0x000000003d37bfff] usable
Mar 21 04:10:26 localhost kernel: reserve setup_data: [mem 0x000000003d37c000-0x000000003d3fffff] reserved
Mar 21 04:10:26 localhost kernel: efi: EFI v2.70 by EDK II
Mar 21 04:10:26 localhost kernel: efi: SMBIOS=0x3126a000 ACPI=0x3135d000 ACPI 2.0=0x3135d014 MEMATTR=0x2fa>
Mar 21 04:10:26 localhost kernel: SMBIOS 2.7 present.

これによりsystemdに出力されるログはjournalctlで確認ができます。

journalctlの詳細は以下マニュアルをご覧ください。

2023/3/21時点ではCloudWatch Agentを使ってjournalをCloudWatch Logsに転送することはできません。

そのため、「/var/log/messagesに特定メッセージが出力されたら、CloudWatch LogsのサブスクリプションフィルターでLambda関数を使って通知する」といったことはできません。

jouranalをFluent Bitを使ってCloudWatch Logsに出力している猛者もいますが、素直にrsyslogをインストールさせた方が良い気もします。

journalの設定は以下の通りです。

$ cat /etc/systemd/journald.conf
#  This file is part of systemd.
#
#  systemd is free software; you can redistribute it and/or modify it under the
#  terms of the GNU Lesser General Public License as published by the Free
#  Software Foundation; either version 2.1 of the License, or (at your option)
#  any later version.
#
# Entries in this file show the compile time defaults. Local configuration
# should be created by either modifying this file, or by creating "drop-ins" in
# the journald.conf.d/ subdirectory. The latter is generally recommended.
# Defaults can be restored by simply deleting this file and all drop-ins.
#
# Use 'systemd-analyze cat-config systemd/journald.conf' to display the full config.
#
# See journald.conf(5) for details.

[Journal]
#Storage=auto
#Compress=yes
#Seal=yes
#SplitMode=uid
#SyncIntervalSec=5m
#RateLimitIntervalSec=30s
#RateLimitBurst=10000
#SystemMaxUse=
#SystemKeepFree=
#SystemMaxFileSize=
#SystemMaxFiles=100
#RuntimeMaxUse=
#RuntimeKeepFree=
#RuntimeMaxFileSize=
#RuntimeMaxFiles=100
#MaxRetentionSec=
#MaxFileSec=1month
#ForwardToSyslog=no
#ForwardToKMsg=no
#ForwardToConsole=no
#ForwardToWall=yes
#TTYPath=/dev/console
#MaxLevelStore=debug
#MaxLevelSyslog=debug
#MaxLevelKMsg=notice
#MaxLevelConsole=info
#MaxLevelWall=emerg
#LineMax=48K
#ReadKMsg=yes
#Audit=yes

全てコメントアウトされているためデフォルトのようですね。

デフォルトだとSystem journal(/var/log/journal)の最大使用量は10%(上限 4GB)なので、journalでがディスクが溢れるということは少なそうです。

各設定値の詳細な説明を以下マニュアルをご覧ください。

Cron がインストールされていない問題

crond.serviceは存在していません。

$ systemctl status crond
Unit crond.service could not be found.

Fedoraのドキュメントを確認すると、cronieというパッケージをインストールすることでCronが使えるようです。

確認してみると確かに標準リポジトリ上にcronieがありました。

$ dnf info cronie
Last metadata expiration check: 1:25:11 ago on Tue Mar 21 04:14:48 2023.
Available Packages
Name         : cronie
Version      : 1.5.7
Release      : 1.amzn2023.0.2
Architecture : x86_64
Size         : 115 k
Source       : cronie-1.5.7-1.amzn2023.0.2.src.rpm
Repository   : amazonlinux
Summary      : Cron daemon for executing programs at set times
URL          : https://github.com/cronie-crond/cronie
License      : MIT and BSD and ISC and GPLv2+
Description  : Cronie contains the standard UNIX daemon crond that runs specified programs at
             : scheduled times and related tools. It is a fork of the original vixie-cron and
             : has security and configuration enhancements like the ability to use pam and
             : SELinux.

Cronを使いたい場合は、上述のFedoraのドキュメントを参考にcronieをインストールして、crond.serviceの起動と自動起動を有効化すれば良さそうですね。

Cronを使わずに定期実行を行いたい場合は、systemdのtimerを設定することでも対応できます。

試しに10秒ごとにecho testをするtimerを設定します。

# 現在動作しているtimer一覧
$ systemctl list-timers
NEXT                        LEFT          LAST                        PASSED       UNIT                    >
Tue 2023-03-21 05:46:47 UTC 35s left      Tue 2023-03-21 05:45:43 UTC 28s ago      refresh-policy-routes@en>
Tue 2023-03-21 05:50:00 UTC 3min 47s left Tue 2023-03-21 05:40:16 UTC 5min ago     sysstat-collect.timer   >
Wed 2023-03-22 00:00:00 UTC 18h left      Tue 2023-03-21 04:10:29 UTC 1h 35min ago logrotate.timer         >
Wed 2023-03-22 00:07:00 UTC 18h left      -                           -            sysstat-summary.timer   >
Wed 2023-03-22 04:25:43 UTC 22h left      Tue 2023-03-21 04:25:43 UTC 1h 20min ago systemd-tmpfiles-clean.t>
Mon 2023-03-27 00:37:26 UTC 5 days left   Mon 2023-03-20 05:19:48 UTC 24h ago      fstrim.timer            >

6 timers listed.
Pass --all to see loaded but inactive timers, too.

# /etc/systemd/system 配下の確認
$ ls -l /etc/systemd/system
total 24
-rw-r--r--. 1 root root   616 Dec 16 00:39 amazon-cloudwatch-agent.service
-rw-r--r--. 1 root root   588 Feb  3 22:34 amazon-ssm-agent.service
drwxr-xr-x. 2 root root    35 Mar 13 23:36 basic.target.wants
drwxr-xr-x. 2 root root   119 Mar 13 23:37 cloud-init.target.wants
lrwxrwxrwx. 1 root root    37 Mar 13 23:36 ctrl-alt-del.target -> /usr/lib/systemd/system/reboot.target
lrwxrwxrwx. 1 root root    48 Mar 13 23:36 dbus-org.freedesktop.network1.service -> /usr/lib/systemd/system/systemd-networkd.service
lrwxrwxrwx. 1 root root    48 Mar 13 23:36 dbus-org.freedesktop.resolve1.service -> /usr/lib/systemd/system/systemd-resolved.service
lrwxrwxrwx. 1 root root    43 Mar 13 23:36 dbus.service -> /usr/lib/systemd/system/dbus-broker.service
drwxr-xr-x. 2 root root    32 Mar 13 23:36 getty.target.wants
drwxr-xr-x. 2 root root 16384 Mar 20 05:20 multi-user.target.wants
drwxr-xr-x. 2 root root    50 Mar 13 23:36 network-online.target.wants
drwxr-xr-x. 2 root root    33 Mar 13 23:37 nfs-blkmap.service.requires
drwxr-xr-x. 2 root root    33 Mar 13 23:37 nfs-idmapd.service.requires
drwxr-xr-x. 2 root root    33 Mar 13 23:37 nfs-mountd.service.requires
drwxr-xr-x. 2 root root    33 Mar 13 23:37 nfs-server.service.requires
drwxr-xr-x. 2 root root    31 Mar 13 23:37 remote-fs.target.wants
drwxr-xr-x. 2 root root    33 Mar 13 23:37 rpc-gssd.service.requires
drwxr-xr-x. 2 root root    33 Mar 13 23:37 rpc-statd-notify.service.requires
drwxr-xr-x. 2 root root    33 Mar 13 23:37 rpc-statd.service.requires
drwxr-xr-x. 2 root root   109 Mar 13 23:37 sockets.target.wants
drwxr-xr-x. 2 root root   147 Mar 13 23:37 sysinit.target.wants
drwxr-xr-x. 2 root root    64 Mar 13 23:37 sysstat.service.wants
drwxr-xr-x. 2 root root    49 Mar 13 23:37 timers.target.wants

# serviceの追加
$ sudo tee /etc/systemd/system/echo-test.service << EOF > /dev/null
[Unit]
Description=echo test

[Service]
User=ec2-user
Group=ec2-user
Type=oneshot

ExecStart=/usr/bin/echo test

[Install]
WantedBy=multi-user.target
EOF

# timerの追加
sudo tee /etc/systemd/system/echo-test.timer << EOF > /dev/null
[Unit]
Description=Runs every 10 seconds

[Timer]
OnBootSec=10s
OnUnitActiveSec=10s
AccuracySec=1s

[Install]
WantedBy=timers.target
EOF

# serviceとtimer追加されたことを確認
$ ls -l /etc/systemd/system
total 32
-rw-r--r--. 1 root root   616 Dec 16 00:39 amazon-cloudwatch-agent.service
-rw-r--r--. 1 root root   588 Feb  3 22:34 amazon-ssm-agent.service
drwxr-xr-x. 2 root root    35 Mar 13 23:36 basic.target.wants
drwxr-xr-x. 2 root root   119 Mar 13 23:37 cloud-init.target.wants
lrwxrwxrwx. 1 root root    37 Mar 13 23:36 ctrl-alt-del.target -> /usr/lib/systemd/system/reboot.target
lrwxrwxrwx. 1 root root    48 Mar 13 23:36 dbus-org.freedesktop.network1.service -> /usr/lib/systemd/system/systemd-networkd.service
lrwxrwxrwx. 1 root root    48 Mar 13 23:36 dbus-org.freedesktop.resolve1.service -> /usr/lib/systemd/system/systemd-resolved.service
lrwxrwxrwx. 1 root root    43 Mar 13 23:36 dbus.service -> /usr/lib/systemd/system/dbus-broker.service
-rw-r--r--. 1 root root   150 Mar 21 07:09 echo-test.service
-rw-r--r--. 1 root root   119 Mar 21 07:09 echo-test.timer
drwxr-xr-x. 2 root root    32 Mar 13 23:36 getty.target.wants
drwxr-xr-x. 2 root root 16384 Mar 20 05:20 multi-user.target.wants
drwxr-xr-x. 2 root root    50 Mar 13 23:36 network-online.target.wants
drwxr-xr-x. 2 root root    33 Mar 13 23:37 nfs-blkmap.service.requires
drwxr-xr-x. 2 root root    33 Mar 13 23:37 nfs-idmapd.service.requires
drwxr-xr-x. 2 root root    33 Mar 13 23:37 nfs-mountd.service.requires
drwxr-xr-x. 2 root root    33 Mar 13 23:37 nfs-server.service.requires
drwxr-xr-x. 2 root root    31 Mar 13 23:37 remote-fs.target.wants
drwxr-xr-x. 2 root root    33 Mar 13 23:37 rpc-gssd.service.requires
drwxr-xr-x. 2 root root    33 Mar 13 23:37 rpc-statd-notify.service.requires
drwxr-xr-x. 2 root root    33 Mar 13 23:37 rpc-statd.service.requires
drwxr-xr-x. 2 root root   109 Mar 13 23:37 sockets.target.wants
drwxr-xr-x. 2 root root   147 Mar 13 23:37 sysinit.target.wants
drwxr-xr-x. 2 root root    64 Mar 13 23:37 sysstat.service.wants
drwxr-xr-x. 2 root root    49 Mar 21 07:08 timers.target.wants

# timerの起動
$ sudo systemctl start echo-test.timer

# timerの自動起動の有効化
$ sudo systemctl enable echo-test.timer
Created symlink /etc/systemd/system/timers.target.wants/echo-test.timer → /etc/systemd/system/echo-test.timer.

# timerのステータスの確認
$ systemctl status echo-test.timer
● echo-test.timer - Runs every 10 seconds
     Loaded: loaded (/etc/systemd/system/echo-test.timer; enabled; preset: disabled)
     Active: active (waiting) since Tue 2023-03-21 07:30:04 UTC; 14s ago
      Until: Tue 2023-03-21 07:30:04 UTC; 14s ago
    Trigger: Tue 2023-03-21 07:30:24 UTC; 6s left
   Triggers: ● echo-test.service

Mar 21 07:30:04 ip-172-31-10-89.ec2.internal systemd[1]: Started echo-test.timer - Runs every 10 seconds.

# 追加したtimerが存在していることを確認
$ systemctl list-timers
NEXT                        LEFT        LAST                        PASSED       UNIT                             ACTIVATES
Tue 2023-03-21 07:30:57 UTC 7s left     Tue 2023-03-21 07:30:47 UTC 2s ago       echo-test.timer                  echo-test>
Tue 2023-03-21 07:31:34 UTC 44s left    Tue 2023-03-21 07:30:33 UTC 16s ago      [email protected] refresh-p>
Tue 2023-03-21 07:40:00 UTC 9min left   Tue 2023-03-21 07:30:04 UTC 45s ago      sysstat-collect.timer            sysstat-c>
Wed 2023-03-22 00:00:00 UTC 16h left    Tue 2023-03-21 04:10:29 UTC 3h 20min ago logrotate.timer                  logrotate>
Wed 2023-03-22 00:07:00 UTC 16h left    -                           -            sysstat-summary.timer            sysstat-s>
Wed 2023-03-22 04:25:43 UTC 20h left    Tue 2023-03-21 04:25:43 UTC 3h 5min ago  systemd-tmpfiles-clean.timer     systemd-t>
Mon 2023-03-27 00:13:36 UTC 5 days left Mon 2023-03-20 05:19:48 UTC 1 day 2h ago fstrim.timer                     fstrim.se>

7 timers listed.
Pass --all to see loaded but inactive timers, too.

# 10秒間隔で実行されていることを確認
$ systemctl list-timers
NEXT                        LEFT        LAST                        PASSED       UNIT                             ACTIVATES
Tue 2023-03-21 07:31:08 UTC 9s left     Tue 2023-03-21 07:30:58 UTC 73ms ago     echo-test.timer                  echo-test>
Tue 2023-03-21 07:31:34 UTC 36s left    Tue 2023-03-21 07:30:33 UTC 24s ago      [email protected] refresh-p>
Tue 2023-03-21 07:40:00 UTC 9min left   Tue 2023-03-21 07:30:04 UTC 53s ago      sysstat-collect.timer            sysstat-c>
Wed 2023-03-22 00:00:00 UTC 16h left    Tue 2023-03-21 04:10:29 UTC 3h 20min ago logrotate.timer                  logrotate>
Wed 2023-03-22 00:07:00 UTC 16h left    -                           -            sysstat-summary.timer            sysstat-s>
Wed 2023-03-22 04:25:43 UTC 20h left    Tue 2023-03-21 04:25:43 UTC 3h 5min ago  systemd-tmpfiles-clean.timer     systemd-t>
Mon 2023-03-27 00:13:36 UTC 5 days left Mon 2023-03-20 05:19:48 UTC 1 day 2h ago fstrim.timer                     fstrim.se>

7 timers listed.
Pass --all to see loaded but inactive timers, too.

# journalで10秒毎に実行されていることを確認
$ journalctl -u echo-test -n 28
Mar 21 07:31:30 ip-172-31-10-89.ec2.internal systemd[1]: Starting echo-test.service - echo test...
Mar 21 07:31:30 ip-172-31-10-89.ec2.internal echo[9787]: test
Mar 21 07:31:30 ip-172-31-10-89.ec2.internal systemd[1]: echo-test.service: Deactivated successfully.
Mar 21 07:31:30 ip-172-31-10-89.ec2.internal systemd[1]: Finished echo-test.service - echo test.
Mar 21 07:31:41 ip-172-31-10-89.ec2.internal systemd[1]: Starting echo-test.service - echo test...
Mar 21 07:31:41 ip-172-31-10-89.ec2.internal echo[9790]: test
Mar 21 07:31:41 ip-172-31-10-89.ec2.internal systemd[1]: echo-test.service: Deactivated successfully.
Mar 21 07:31:41 ip-172-31-10-89.ec2.internal systemd[1]: Finished echo-test.service - echo test.
Mar 21 07:31:52 ip-172-31-10-89.ec2.internal systemd[1]: Starting echo-test.service - echo test...
Mar 21 07:31:52 ip-172-31-10-89.ec2.internal echo[9845]: test
Mar 21 07:31:52 ip-172-31-10-89.ec2.internal systemd[1]: echo-test.service: Deactivated successfully.
Mar 21 07:31:52 ip-172-31-10-89.ec2.internal systemd[1]: Finished echo-test.service - echo test.
Mar 21 07:32:03 ip-172-31-10-89.ec2.internal systemd[1]: Starting echo-test.service - echo test...
Mar 21 07:32:03 ip-172-31-10-89.ec2.internal echo[9849]: test
Mar 21 07:32:03 ip-172-31-10-89.ec2.internal systemd[1]: echo-test.service: Deactivated successfully.
Mar 21 07:32:03 ip-172-31-10-89.ec2.internal systemd[1]: Finished echo-test.service - echo test.
Mar 21 07:32:14 ip-172-31-10-89.ec2.internal systemd[1]: Starting echo-test.service - echo test...
Mar 21 07:32:14 ip-172-31-10-89.ec2.internal echo[9851]: test
Mar 21 07:32:14 ip-172-31-10-89.ec2.internal systemd[1]: echo-test.service: Deactivated successfully.
Mar 21 07:32:14 ip-172-31-10-89.ec2.internal systemd[1]: Finished echo-test.service - echo test.
Mar 21 07:32:25 ip-172-31-10-89.ec2.internal systemd[1]: Starting echo-test.service - echo test...
Mar 21 07:32:25 ip-172-31-10-89.ec2.internal echo[9852]: test
Mar 21 07:32:25 ip-172-31-10-89.ec2.internal systemd[1]: echo-test.service: Deactivated successfully.
Mar 21 07:32:25 ip-172-31-10-89.ec2.internal systemd[1]: Finished echo-test.service - echo test.
Mar 21 07:32:36 ip-172-31-10-89.ec2.internal systemd[1]: Starting echo-test.service - echo test...
Mar 21 07:32:36 ip-172-31-10-89.ec2.internal echo[9853]: test
Mar 21 07:32:36 ip-172-31-10-89.ec2.internal systemd[1]: echo-test.service: Deactivated successfully.
Mar 21 07:32:36 ip-172-31-10-89.ec2.internal systemd[1]: Finished echo-test.service - echo test.

約10秒毎にecho testが実行されていますね。

正確に10秒毎に実行したい場合はtimerの精度AccuracySecを100msなど小さい値にするなど調整をしてください。ただし、小さい値にするとCPU負荷に影響があると考えます。

serviceとtimerの2つのファイルを作成する必要がありますが、[Timer]でかなり自由にスケジューリングすることができます。

systemd.timerとsystemd.timeの詳細は以下マニュアルをご覧ください。

デフォルトで起動していないサービスの比較

Amazon Linux 2でデフォルトで起動していないサービス

せっかくなのでデフォルトで起動していないサービスも比較します。

Amazon Linux 2でデフォルトで起動していないサービスは以下の通りです。

$ sudo systemctl list-units --type=service -all | awk '$1 ~ /service$/ && $3 == "inactive" {printf "%-50s %7s\n",$1, $3}'
amzn2-early-relabel-modules.service                inactive
auth-rpcgss-module.service                         inactive
brandbot.service                                   inactive
dm-event.service                                   inactive
dmraid-activation.service                          inactive
dracut-cmdline.service                             inactive
dracut-initqueue.service                           inactive
dracut-mount.service                               inactive
dracut-pre-mount.service                           inactive
dracut-pre-pivot.service                           inactive
dracut-pre-trigger.service                         inactive
dracut-pre-udev.service                            inactive
dracut-shutdown.service                            inactive
ec2net-scan.service                                inactive
emergency.service                                  inactive
hibinit-agent.service                              inactive
initrd-cleanup.service                             inactive
initrd-parse-etc.service                           inactive
initrd-switch-root.service                         inactive
initrd-udevadm-cleanup-db.service                  inactive
lvm2-lvmpolld.service                              inactive
mdmonitor.service                                  inactive
microcode.service                                  inactive
nfs-config.service                                 inactive
nfs-idmapd.service                                 inactive
nfs-mountd.service                                 inactive
nfs-server.service                                 inactive
nfs-utils.service                                  inactive
plymouth-quit-wait.service                         inactive
plymouth-quit.service                              inactive
plymouth-read-write.service                        inactive
plymouth-start.service                             inactive
plymouth-switch-root.service                       inactive
rc-local.service                                   inactive
rescue.service                                     inactive
rhel-autorelabel-mark.service                      inactive
rhel-autorelabel.service                           inactive
rhel-configure.service                             inactive
rhel-import-state.service                          inactive
rhel-loadmodules.service                           inactive
rpc-gssd.service                                   inactive
rpc-statd-notify.service                           inactive
rpc-statd.service                                  inactive
[email protected] inactive
sshd-keygen.service                                inactive
systemd-ask-password-console.service               inactive
systemd-ask-password-plymouth.service              inactive
systemd-ask-password-wall.service                  inactive
systemd-binfmt.service                             inactive
systemd-firstboot.service                          inactive
systemd-hwdb-update.service                        inactive
systemd-initctl.service                            inactive
systemd-journal-catalog-update.service             inactive
systemd-machine-id-commit.service                  inactive
systemd-readahead-collect.service                  inactive
systemd-readahead-done.service                     inactive
systemd-readahead-replay.service                   inactive
systemd-reboot.service                             inactive
systemd-shutdownd.service                          inactive
systemd-tmpfiles-clean.service                     inactive
systemd-update-done.service                        inactive
systemd-update-utmp-runlevel.service               inactive

Amazon Linux 2023でデフォルトで起動していないサービス

Amazon Linux 2023でデフォルトで起動していないサービスは以下の通りです。

$ sudo systemctl list-units --type=service --state=inactive | awk '$1 ~ /service$/ {printf "%-50s %7s\n",$1, $3}'
auth-rpcgss-module.service                         inactive
dracut-cmdline.service                             inactive
dracut-initqueue.service                           inactive
dracut-mount.service                               inactive
dracut-pre-mount.service                           inactive
dracut-pre-pivot.service                           inactive
dracut-pre-trigger.service                         inactive
dracut-pre-udev.service                            inactive
emergency.service                                  inactive
fstrim.service                                     inactive
hibinit-agent.service                              inactive
import-state.service                               inactive
initrd-cleanup.service                             inactive
initrd-parse-etc.service                           inactive
initrd-switch-root.service                         inactive
initrd-udevadm-cleanup-db.service                  inactive
ldconfig.service                                   inactive
logrotate.service                                  inactive
[email protected]                          inactive
[email protected]                               inactive
[email protected]                              inactive
nfs-blkmap.service                                 inactive
nfs-convert.service                                inactive
nfs-idmapd.service                                 inactive
nfs-mountd.service                                 inactive
nfs-server.service                                 inactive
nfs-utils.service                                  inactive
nfsdcld.service                                    inactive
rc-local.service                                   inactive
rescue.service                                     inactive
rpc-gssd.service                                   inactive
rpc-statd.service                                  inactive
rpcbind.service                                    inactive
rpmdb-rebuild.service                              inactive
selinux-autorelabel-mark.service                   inactive
[email protected]                          inactive
[email protected]                        inactive
[email protected]                            inactive
sssd-kcm.service                                   inactive
sysstat-collect.service                            inactive
sysstat-summary.service                            inactive
systemd-ask-password-console.service               inactive
systemd-ask-password-wall.service                  inactive
systemd-binfmt.service                             inactive
systemd-firstboot.service                          inactive
systemd-fsck@dev-disk-by\x2duuid-3690\x2d9E6B.service inactive
systemd-hwdb-update.service                        inactive
systemd-initctl.service                            inactive
systemd-journal-catalog-update.service             inactive
systemd-machine-id-commit.service                  inactive
systemd-modules-load.service                       inactive
systemd-quotacheck.service                         inactive
systemd-repart.service                             inactive
systemd-sysusers.service                           inactive
systemd-timesyncd.service                          inactive
systemd-tmpfiles-clean.service                     inactive
systemd-udev-settle.service                        inactive
systemd-update-done.service                        inactive
systemd-update-utmp-runlevel.service               inactive
systemd-vconsole-setup.service                     inactive
update-motd.service                                inactive

デフォルトで起動していないサービスの比較

各OSの出力結果をファイルに保存してdiffします。

>  diff AL2_services_inactive.log AL2023_services_inactive.log -u -U 0
--- AL2_services_inactive.log	2023-03-21 14:33:05
+++ AL2023_services_inactive.log	2023-03-21 14:28:29
@@ -1,2 +1 @@
-$ sudo systemctl list-units --type=service -all | awk '$1 ~ /service$/ && $3 == "inactive" {printf "%-50s %7s\n",$1, $3}'
-amzn2-early-relabel-modules.service                inactive
+$ sudo systemctl list-units --type=service --state=inactive | awk '$1 ~ /service$/ {printf "%-50s %7s\n",$1, $3}'
@@ -4,3 +2,0 @@
-brandbot.service                                   inactive
-dm-event.service                                   inactive
-dmraid-activation.service                          inactive
@@ -14,2 +9,0 @@
-dracut-shutdown.service                            inactive
-ec2net-scan.service                                inactive
@@ -16,0 +11 @@
+fstrim.service                                     inactive
@@ -17,0 +13 @@
+import-state.service                               inactive
@@ -22,4 +18,7 @@
-lvm2-lvmpolld.service                              inactive
-mdmonitor.service                                  inactive
-microcode.service                                  inactive
-nfs-config.service                                 inactive
+ldconfig.service                                   inactive
+logrotate.service                                  inactive
[email protected]                          inactive
[email protected]                               inactive
[email protected]                              inactive
+nfs-blkmap.service                                 inactive
+nfs-convert.service                                inactive
@@ -30,5 +29 @@
-plymouth-quit-wait.service                         inactive
-plymouth-quit.service                              inactive
-plymouth-read-write.service                        inactive
-plymouth-start.service                             inactive
-plymouth-switch-root.service                       inactive
+nfsdcld.service                                    inactive
@@ -37,5 +31,0 @@
-rhel-autorelabel-mark.service                      inactive
-rhel-autorelabel.service                           inactive
-rhel-configure.service                             inactive
-rhel-import-state.service                          inactive
-rhel-loadmodules.service                           inactive
@@ -43 +32,0 @@
-rpc-statd-notify.service                           inactive
@@ -45,2 +34,9 @@
[email protected] inactive
-sshd-keygen.service                                inactive
+rpcbind.service                                    inactive
+rpmdb-rebuild.service                              inactive
+selinux-autorelabel-mark.service                   inactive
[email protected]                          inactive
[email protected]                        inactive
[email protected]                            inactive
+sssd-kcm.service                                   inactive
+sysstat-collect.service                            inactive
+sysstat-summary.service                            inactive
@@ -48 +43,0 @@
-systemd-ask-password-plymouth.service              inactive
@@ -51,0 +47 @@
+systemd-fsck@dev-disk-by\x2duuid-3690\x2d9E6B.service inactive
@@ -56,5 +52,5 @@
-systemd-readahead-collect.service                  inactive
-systemd-readahead-done.service                     inactive
-systemd-readahead-replay.service                   inactive
-systemd-reboot.service                             inactive
-systemd-shutdownd.service                          inactive
+systemd-modules-load.service                       inactive
+systemd-quotacheck.service                         inactive
+systemd-repart.service                             inactive
+systemd-sysusers.service                           inactive
+systemd-timesyncd.service                          inactive
@@ -61,0 +58 @@
+systemd-udev-settle.service                        inactive
@@ -63 +60,3 @@
-systemd-update-utmp-runlevel.service               inactive
\ No newline at end of file
+systemd-update-utmp-runlevel.service               inactive
+systemd-vconsole-setup.service                     inactive
+update-motd.service                                inactive
\ No newline at end of file

Amazon Linux 2のみで起動していないサービス

  • amzn2earlyrelabelmodules.service
  • brandbot.service
  • dmevent.service
  • dmraidactivation.service
  • dracutshutdown.service
  • ec2netscan.service
  • lvm2lvmpolld.service
  • mdmonitor.service
  • microcode.service
  • nfsconfig.service
  • plymouthquitwait.service
  • plymouthquit.service
  • plymouthreadwrite.service
  • plymouthstart.service
  • plymouthswitchroot.service
  • rhelautorelabelmark.service
  • rhelautorelabel.service
  • rhelconfigure.service
  • rhelimportstate.service
  • rhelloadmodules.service
  • rpcstatdnotify.service
  • [email protected]
  • sshdkeygen.service
  • systemdaskpasswordplymouth.service
  • systemdreadaheadcollect.service
  • systemdreadaheaddone.service
  • systemdreadaheadreplay.service
  • systemdreboot.service
  • systemdshutdownd.service
  • systemdupdateutmprunlevel.service

Amazon Linux 2023のみで起動していないサービス

  • fstrim.service
  • import-state.service
  • ldconfig.service
  • logrotate.service
  • [email protected]
  • [email protected]
  • [email protected]
  • nfs-blkmap.service
  • nfs-convert.service
  • nfsdcld.service
  • rpcbind.service
  • rpmdb-rebuild.service
  • selinux-autorelabel-mark.service
  • [email protected]
  • [email protected]
  • [email protected]
  • sssd-kcm.service
  • sysstat-collect.service
  • sysstat-summary.service
  • systemd-fsck@dev-disk-by\x2duuid-3690\x2d9E6B.service
  • systemd-modules-load.service
  • systemd-quotacheck.service
  • systemd-repart.service
  • systemd-sysusers.service
  • systemd-timesyncd.service
  • systemd-udev-settle.service
  • systemd-update-utmp-runlevel.service
  • systemd-vconsole-setup.service
  • update-motd.service

インストールされているパッケージの比較

Amazon Linux 2でインストールされているパッケージ

Amazon Linux 2でインストールされているパッケージは以下の通りです。

Amazon Linux 2でインストールされているパッケージ (長いので折りたたんでいます)
$ yum list installed | awk '{print $1}'
読み込んだプラグイン:extras_suggestions,
インストール済みパッケージ
GeoIP.x86_64
PyYAML.x86_64
acl.x86_64
acpid.x86_64
amazon-cloudwatch-agent.x86_64
amazon-linux-extras.noarch
amazon-linux-extras-yum-plugin.noarch
amazon-ssm-agent.x86_64
at.x86_64
attr.x86_64
audit.x86_64
audit-libs.x86_64
authconfig.x86_64
aws-cfn-bootstrap.noarch
awscli.noarch
basesystem.noarch
bash.x86_64
bash-completion.noarch
bc.x86_64
bind-export-libs.x86_64
bind-libs.x86_64
bind-libs-lite.x86_64
bind-license.noarch
bind-utils.x86_64
binutils.x86_64
blktrace.x86_64
boost-date-time.x86_64
boost-system.x86_64
boost-thread.x86_64
bridge-utils.x86_64
bzip2.x86_64
bzip2-libs.x86_64
ca-certificates.noarch
chkconfig.x86_64
chrony.x86_64
cloud-init.noarch
cloud-utils-growpart.noarch
coreutils.x86_64
cpio.x86_64
cracklib.x86_64
cracklib-dicts.x86_64
cronie.x86_64
cronie-anacron.x86_64
crontabs.noarch
cryptsetup.x86_64
cryptsetup-libs.x86_64
curl.x86_64
cyrus-sasl-lib.x86_64
cyrus-sasl-plain.x86_64
dbus.x86_64
dbus-libs.x86_64
device-mapper.x86_64
device-mapper-event.x86_64
device-mapper-event-libs.x86_64
device-mapper-libs.x86_64
device-mapper-persistent-data.x86_64
dhclient.x86_64
dhcp-common.x86_64
dhcp-libs.x86_64
diffutils.x86_64
dmidecode.x86_64
dmraid.x86_64
dmraid-events.x86_64
dosfstools.x86_64
dracut.x86_64
dracut-config-ec2.noarch
dracut-config-generic.x86_64
dyninst.x86_64
e2fsprogs.x86_64
e2fsprogs-libs.x86_64
ec2-hibinit-agent.noarch
ec2-instance-connect.noarch
ec2-instance-connect-selinux.noarch
ec2-net-utils.noarch
ec2-utils.noarch
ed.x86_64
elfutils-default-yama-scope.noarch
elfutils-libelf.x86_64
elfutils-libs.x86_64
ethtool.x86_64
expat.x86_64
file.x86_64
file-libs.x86_64
filesystem.x86_64
findutils.x86_64
fipscheck.x86_64
fipscheck-lib.x86_64
freetype.x86_64
fuse-libs.x86_64
gawk.x86_64
gdbm.x86_64
gdisk.x86_64
generic-logos.noarch
gettext.x86_64
gettext-libs.x86_64
glib2.x86_64
glibc.x86_64
glibc-all-langpacks.x86_64
glibc-common.x86_64
glibc-locale-source.x86_64
glibc-minimal-langpack.x86_64
gmp.x86_64
gnupg2.x86_64
gpgme.x86_64
gpm-libs.x86_64
grep.x86_64
groff-base.x86_64
grub2.x86_64
grub2-common.noarch
grub2-efi-x64-ec2.x86_64
grub2-pc.x86_64
grub2-pc-modules.noarch
grub2-tools.x86_64
grub2-tools-minimal.x86_64
grubby.x86_64
gssproxy.x86_64
gzip.x86_64
hardlink.x86_64
hibagent.noarch
hostname.x86_64
hunspell.x86_64
hunspell-en.noarch
hunspell-en-GB.noarch
hunspell-en-US.noarch
hwdata.x86_64
info.x86_64
initscripts.x86_64
iproute.x86_64
iptables.x86_64
iptables-libs.x86_64
iputils.x86_64
irqbalance.x86_64
jansson.x86_64
jbigkit-libs.x86_64
json-c.x86_64
kbd.x86_64
kbd-legacy.noarch
kbd-misc.noarch
kernel.x86_64
kernel-tools.x86_64
keyutils.x86_64
keyutils-libs.x86_64
kmod.x86_64
kmod-libs.x86_64
kpartx.x86_64
kpatch-runtime.noarch
krb5-libs.x86_64
langtable.noarch
langtable-data.noarch
langtable-python.noarch
less.x86_64
libacl.x86_64
libaio.x86_64
libassuan.x86_64
libattr.x86_64
libbasicobjects.x86_64
libblkid.x86_64
libcap.x86_64
libcap-ng.x86_64
libcollection.x86_64
libcom_err.x86_64
libconfig.x86_64
libcroco.x86_64
libcrypt.x86_64
libcurl.x86_64
libdaemon.x86_64
libdb.x86_64
libdb-utils.x86_64
libdrm.x86_64
libdwarf.x86_64
libedit.x86_64
libestr.x86_64
libevent.x86_64
libfastjson.x86_64
libfdisk.x86_64
libffi.x86_64
libgcc.x86_64
libgcrypt.x86_64
libgomp.x86_64
libgpg-error.x86_64
libicu.x86_64
libidn.x86_64
libidn2.x86_64
libini_config.x86_64
libjpeg-turbo.x86_64
libmetalink.x86_64
libmnl.x86_64
libmount.x86_64
libnetfilter_conntrack.x86_64
libnfnetlink.x86_64
libnfsidmap.x86_64
libnghttp2.x86_64
libnl3.x86_64
libnl3-cli.x86_64
libpath_utils.x86_64
libpcap.x86_64
libpciaccess.x86_64
libpipeline.x86_64
libpng.x86_64
libpwquality.x86_64
libref_array.x86_64
libseccomp.x86_64
libselinux.x86_64
libselinux-utils.x86_64
libsemanage.x86_64
libsepol.x86_64
libsmartcols.x86_64
libss.x86_64
libssh2.x86_64
libsss_idmap.x86_64
libsss_nss_idmap.x86_64
libstdc++.x86_64
libstoragemgmt.x86_64
libstoragemgmt-python.noarch
libstoragemgmt-python-clibs.x86_64
libsysfs.x86_64
libtasn1.x86_64
libteam.x86_64
libtiff.x86_64
libtirpc.x86_64
libunistring.x86_64
libuser.x86_64
libutempter.x86_64
libuuid.x86_64
libverto.x86_64
libverto-libevent.x86_64
libwebp.x86_64
libxml2.x86_64
libxml2-python.x86_64
libyaml.x86_64
lm_sensors-libs.x86_64
logrotate.x86_64
lsof.x86_64
lua.x86_64
lvm2.x86_64
lvm2-libs.x86_64
lz4.x86_64
make.x86_64
man-db.x86_64
man-pages.noarch
man-pages-overrides.x86_64
mariadb-libs.x86_64
mdadm.x86_64
microcode_ctl.x86_64
mlocate.x86_64
mtr.x86_64
nano.x86_64
ncurses.x86_64
ncurses-base.noarch
ncurses-libs.x86_64
net-tools.x86_64
nettle.x86_64
newt.x86_64
newt-python.x86_64
nfs-utils.x86_64
nspr.x86_64
nss.x86_64
nss-pem.x86_64
nss-softokn.x86_64
nss-softokn-freebl.x86_64
nss-sysinit.x86_64
nss-tools.x86_64
nss-util.x86_64
ntsysv.x86_64
numactl-libs.x86_64
openldap.x86_64
openssh.x86_64
openssh-clients.x86_64
openssh-server.x86_64
openssl.x86_64
openssl-libs.x86_64
os-prober.x86_64
p11-kit.x86_64
p11-kit-trust.x86_64
pam.x86_64
parted.x86_64
passwd.x86_64
pciutils.x86_64
pciutils-libs.x86_64
pcre.x86_64
pcre2.x86_64
perl.x86_64
perl-Carp.noarch
perl-Encode.x86_64
perl-Exporter.noarch
perl-File-Path.noarch
perl-File-Temp.noarch
perl-Filter.x86_64
perl-Getopt-Long.noarch
perl-HTTP-Tiny.noarch
perl-PathTools.x86_64
perl-Pod-Escapes.noarch
perl-Pod-Perldoc.noarch
perl-Pod-Simple.noarch
perl-Pod-Usage.noarch
perl-Scalar-List-Utils.x86_64
perl-Socket.x86_64
perl-Storable.x86_64
perl-Text-ParseWords.noarch
perl-Time-HiRes.x86_64
perl-Time-Local.noarch
perl-constant.noarch
perl-libs.x86_64
perl-macros.x86_64
perl-parent.noarch
perl-podlators.noarch
perl-threads.x86_64
perl-threads-shared.x86_64
pinentry.x86_64
pkgconfig.x86_64
plymouth.x86_64
plymouth-core-libs.x86_64
plymouth-scripts.x86_64
pm-utils.x86_64
policycoreutils.x86_64
popt.x86_64
postfix.x86_64
procps-ng.x86_64
psacct.x86_64
psmisc.x86_64
pth.x86_64
pygpgme.x86_64
pyliblzma.x86_64
pystache.noarch
python.x86_64
python-babel.noarch
python-backports.x86_64
python-backports-ssl_match_hostname.noarch
3.5.0.1-1.amzn2
python-cffi.x86_64
python-chardet.noarch
python-configobj.noarch
python-daemon.noarch
python-devel.x86_64
python-docutils.noarch
python-enum34.noarch
python-idna.noarch
python-iniparse.noarch
python-ipaddress.noarch
python-jinja2.noarch
python-jsonpatch.noarch
python-jsonpointer.noarch
python-jwcrypto.noarch
python-kitchen.noarch
python-libs.x86_64
python-lockfile.noarch
python-markupsafe.x86_64
python-pillow.x86_64
python-ply.noarch
python-pycparser.noarch
python-pycurl.x86_64
python-repoze-lru.noarch
python-requests.noarch
python-simplejson.x86_64
python-urlgrabber.noarch
python-urllib3.noarch
python2-botocore.noarch
python2-colorama.noarch
python2-cryptography.x86_64
python2-dateutil.noarch
python2-futures.noarch
python2-jmespath.noarch
python2-jsonschema.noarch
python2-oauthlib.noarch
python2-pyasn1.noarch
python2-rpm.x86_64
python2-rsa.noarch
python2-s3transfer.noarch
python2-setuptools.noarch
python2-six.noarch
python3.x86_64
python3-daemon.noarch
python3-docutils.noarch
python3-libs.x86_64
python3-lockfile.noarch
python3-pip.noarch
python3-pystache.noarch
python3-setuptools.noarch
python3-simplejson.x86_64
pyxattr.x86_64
qrencode-libs.x86_64
quota.x86_64
quota-nls.noarch
rdate.x86_64
readline.x86_64
rng-tools.x86_64
rootfiles.noarch
rpcbind.x86_64
rpm.x86_64
rpm-build-libs.x86_64
rpm-libs.x86_64
rpm-plugin-systemd-inhibit.x86_64
rsync.x86_64
rsyslog.x86_64
scl-utils.x86_64
screen.x86_64
installed
sed.x86_64
selinux-policy.noarch
selinux-policy-targeted.noarch
setserial.x86_64
setup.noarch
setuptool.x86_64
sgpio.x86_64
shadow-utils.x86_64
shared-mime-info.x86_64
slang.x86_64
sqlite.x86_64
sssd-client.x86_64
strace.x86_64
sudo.x86_64
sysctl-defaults.noarch
sysstat.x86_64
system-release.x86_64
systemd.x86_64
systemd-libs.x86_64
systemd-sysv.x86_64
systemtap-runtime.x86_64
sysvinit-tools.x86_64
tar.x86_64
tcp_wrappers.x86_64
tcp_wrappers-libs.x86_64
tcpdump.x86_64
tcsh.x86_64
teamd.x86_64
time.x86_64
traceroute.x86_64
tzdata.noarch
unzip.x86_64
update-motd.noarch
usermode.x86_64
ustr.x86_64
util-linux.x86_64
vim-common.x86_64
vim-data.noarch
vim-enhanced.x86_64
vim-filesystem.noarch
vim-minimal.x86_64
virt-what.x86_64
wget.x86_64
which.x86_64
words.noarch
xfsdump.x86_64
xfsprogs.x86_64
xz.x86_64
xz-libs.x86_64
yajl.x86_64
yum.noarch
yum-langpacks.noarch
yum-metadata-parser.x86_64
yum-plugin-priorities.noarch
yum-utils.noarch
zip.x86_64
zlib.x86_64

3.5.0.1-1.amzn2となっているものはpython-backports-ssl_match_hostname.noarchでした。

Amazon Linux 2023でインストールされているパッケージ

Amazon Linux 2023でインストールされているパッケージは以下の通りです。

Amazon Linux 2023でインストールされているパッケージ (長いので折りたたんでいます)
$ dnf list --installed | awk '{print $1}'
History database cannot be created, using in-memory database instead: SQLite error on "/var/lib/dnf/history.sqlite": Open failed: unable to open database file
Installed
acl.x86_64
acpid.x86_64
alternatives.x86_64
amazon-cloudwatch-agent.x86_64
amazon-ec2-net-utils.noarch
amazon-linux-repo-s3.noarch
amazon-rpm-config.noarch
amazon-ssm-agent.x86_64
at.x86_64
attr.x86_64
audit.x86_64
audit-libs.x86_64
aws-cfn-bootstrap.noarch
awscli-2.noarch
basesystem.noarch
bash.x86_64
bash-completion.noarch
bc.x86_64
bind-libs.x86_64
bind-license.noarch
bind-utils.x86_64
binutils.x86_64
boost-filesystem.x86_64
boost-system.x86_64
boost-thread.x86_64
bzip2.x86_64
bzip2-libs.x86_64
c-ares.x86_64
ca-certificates.noarch
checkpolicy.x86_64
chkconfig.x86_64
chrony.x86_64
cloud-init.noarch
cloud-utils-growpart.x86_64
coreutils.x86_64
coreutils-common.x86_64
cpio.x86_64
cracklib.x86_64
cracklib-dicts.x86_64
crontabs.noarch
crypto-policies.noarch
crypto-policies-scripts.noarch
cryptsetup.x86_64
cryptsetup-libs.x86_64
curl-minimal.x86_64
cyrus-sasl-lib.x86_64
cyrus-sasl-plain.x86_64
dbus.x86_64
dbus-broker.x86_64
dbus-common.noarch
dbus-libs.x86_64
device-mapper.x86_64
device-mapper-libs.x86_64
diffutils.x86_64
dnf.noarch
dnf-data.noarch
dnf-plugin-release-notification.noarch
1.2-1.amzn2023.0.2
dnf-plugin-support-info.noarch
dnf-plugins-core.noarch
dosfstools.x86_64
dracut.x86_64
dracut-config-ec2.noarch
dracut-config-generic.x86_64
dwz.x86_64
dyninst.x86_64
e2fsprogs.x86_64
e2fsprogs-libs.x86_64
ec2-hibinit-agent.noarch
ec2-instance-connect.noarch
ec2-instance-connect-selinux.noarch
ec2-utils.noarch
ed.x86_64
efi-filesystem.noarch
efi-srpm-macros.noarch
elfutils-debuginfod-client.x86_64
elfutils-default-yama-scope.noarch
elfutils-libelf.x86_64
elfutils-libs.x86_64
ethtool.x86_64
expat.x86_64
file.x86_64
file-libs.x86_64
filesystem.x86_64
findutils.x86_64
fonts-srpm-macros.noarch
fstrm.x86_64
fuse-libs.x86_64
gawk.x86_64
gdbm-libs.x86_64
gdisk.x86_64
gettext.x86_64
gettext-libs.x86_64
ghc-srpm-macros.noarch
glib2.x86_64
glibc.x86_64
glibc-all-langpacks.x86_64
glibc-common.x86_64
glibc-gconv-extra.x86_64
glibc-locale-source.x86_64
gmp.x86_64
gnupg2-minimal.x86_64
gnutls.x86_64
go-srpm-macros.noarch
gpgme.x86_64
gpm-libs.x86_64
grep.x86_64
groff-base.x86_64
grub2-common.noarch
grub2-efi-x64-ec2.x86_64
grub2-pc-modules.noarch
grub2-tools.x86_64
grub2-tools-minimal.x86_64
grubby.x86_64
gssproxy.x86_64
gzip.x86_64
hostname.x86_64
hunspell.x86_64
hunspell-en.noarch
hunspell-en-GB.noarch
hunspell-en-US.noarch
hunspell-filesystem.x86_64
hwdata.noarch
info.x86_64
inih.x86_64
initscripts.x86_64
iproute.x86_64
iputils.x86_64
irqbalance.x86_64
jansson.x86_64
jitterentropy.x86_64
json-c.x86_64
kbd.x86_64
kbd-misc.noarch
kernel.x86_64
kernel-livepatch-repo-s3.noarch
kernel-srpm-macros.noarch
kernel-tools.x86_64
keyutils.x86_64
keyutils-libs.x86_64
kmod.x86_64
kmod-libs.x86_64
kpatch-runtime.noarch
krb5-libs.x86_64
less.x86_64
libacl.x86_64
libaio.x86_64
libarchive.x86_64
libargon2.x86_64
libassuan.x86_64
libattr.x86_64
libbasicobjects.x86_64
libblkid.x86_64
libcap.x86_64
libcap-ng.x86_64
libcbor.x86_64
libcollection.x86_64
libcom_err.x86_64
libcomps.x86_64
libconfig.x86_64
libcurl-minimal.x86_64
libdb.x86_64
libdhash.x86_64
libdnf.x86_64
libeconf.x86_64
libedit.x86_64
libev.x86_64
libevent.x86_64
libfdisk.x86_64
libffi.x86_64
libfido2.x86_64
libgcc.x86_64
libgcrypt.x86_64
libgomp.x86_64
libgpg-error.x86_64
libibverbs.x86_64
libidn2.x86_64
libini_config.x86_64
libkcapi.x86_64
libkcapi-hmaccalc.x86_64
libldb.x86_64
libmaxminddb.x86_64
libmetalink.x86_64
libmnl.x86_64
libmodulemd.x86_64
libmount.x86_64
libnfsidmap.x86_64
libnghttp2.x86_64
libnl3.x86_64
libpath_utils.x86_64
libpcap.x86_64
libpipeline.x86_64
libpkgconf.x86_64
libpsl.x86_64
libpwquality.x86_64
libref_array.x86_64
librepo.x86_64
libreport-filesystem.noarch
libseccomp.x86_64
libselinux.x86_64
libselinux-utils.x86_64
libsemanage.x86_64
libsepol.x86_64
libsigsegv.x86_64
libsmartcols.x86_64
libsolv.x86_64
libss.x86_64
libsss_certmap.x86_64
libsss_idmap.x86_64
libsss_nss_idmap.x86_64
libstdc++.x86_64
libstoragemgmt.x86_64
libtalloc.x86_64
libtasn1.x86_64
libtdb.x86_64
libtevent.x86_64
libtextstyle.x86_64
libtirpc.x86_64
libunistring.x86_64
libuser.x86_64
libutempter.x86_64
libuuid.x86_64
libuv.x86_64
libverto.x86_64
libverto-libev.x86_64
libxcrypt.x86_64
libxml2.x86_64
libyaml.x86_64
libzstd.x86_64
lm_sensors-libs.x86_64
lmdb-libs.x86_64
logrotate.x86_64
lsof.x86_64
lua-libs.x86_64
lua-srpm-macros.noarch
lz4-libs.x86_64
man-db.x86_64
man-pages.noarch
microcode_ctl.x86_64
mpfr.x86_64
nano.x86_64
ncurses.x86_64
ncurses-base.noarch
ncurses-libs.x86_64
net-tools.x86_64
nettle.x86_64
newt.x86_64
nfs-utils.x86_64
npth.x86_64
nspr.x86_64
nss.x86_64
nss-softokn.x86_64
nss-softokn-freebl.x86_64
nss-sysinit.x86_64
nss-util.x86_64
ntsysv.x86_64
numactl-libs.x86_64
ocaml-srpm-macros.noarch
openblas-srpm-macros.noarch
openldap.x86_64
openssh.x86_64
openssh-clients.x86_64
openssh-server.x86_64
openssl.x86_64
openssl-libs.x86_64
openssl-pkcs11.x86_64
os-prober.x86_64
p11-kit.x86_64
p11-kit-trust.x86_64
package-notes-srpm-macros.noarch
pam.x86_64
parted.x86_64
passwd.x86_64
pciutils.x86_64
pciutils-libs.x86_64
pcre2.x86_64
pcre2-syntax.noarch
perl-Carp.noarch
perl-Class-Struct.noarch
perl-DynaLoader.x86_64
perl-Encode.x86_64
perl-Errno.x86_64
perl-Exporter.noarch
perl-Fcntl.x86_64
perl-File-Basename.noarch
perl-File-Path.noarch
perl-File-Temp.noarch
perl-File-stat.noarch
perl-Getopt-Long.noarch
perl-Getopt-Std.noarch
perl-HTTP-Tiny.noarch
perl-IO.x86_64
perl-IPC-Open3.noarch
perl-MIME-Base64.x86_64
perl-POSIX.x86_64
perl-PathTools.x86_64
perl-Pod-Escapes.noarch
perl-Pod-Perldoc.noarch
perl-Pod-Simple.noarch
perl-Pod-Usage.noarch
perl-Scalar-List-Utils.x86_64
perl-SelectSaver.noarch
perl-Socket.x86_64
perl-Storable.x86_64
perl-Symbol.noarch
perl-Term-ANSIColor.noarch
perl-Term-Cap.noarch
perl-Text-ParseWords.noarch
perl-Text-Tabs+Wrap.noarch
perl-Time-Local.noarch
perl-constant.noarch
perl-if.noarch
perl-interpreter.x86_64
perl-libs.x86_64
perl-mro.x86_64
perl-overload.noarch
perl-overloading.noarch
perl-parent.noarch
perl-podlators.noarch
perl-srpm-macros.noarch
perl-subs.noarch
perl-vars.noarch
pkgconf.x86_64
pkgconf-m4.noarch
pkgconf-pkg-config.x86_64
policycoreutils.x86_64
policycoreutils-python-utils.noarch
popt.x86_64
procps-ng.x86_64
protobuf-c.x86_64
psacct.x86_64
psmisc.x86_64
publicsuffix-list-dafsa.noarch
python-chevron.x86_64
python-srpm-macros.noarch
python3.x86_64
python3-attrs.noarch
python3-audit.x86_64
python3-awscrt.x86_64
python3-babel.noarch
python3-cffi.x86_64
python3-chardet.noarch
python3-colorama.noarch
python3-configobj.noarch
python3-cryptography.x86_64
python3-daemon.noarch
python3-dateutil.noarch
python3-dbus.x86_64
python3-distro.noarch
python3-dnf.noarch
python3-dnf-plugins-core.noarch
python3-docutils.noarch
python3-gpg.x86_64
python3-hawkey.x86_64
python3-idna.noarch
python3-jinja2.noarch
python3-jmespath.noarch
python3-jsonpatch.noarch
python3-jsonpointer.noarch
python3-jsonschema.noarch
python3-libcomps.x86_64
python3-libdnf.x86_64
python3-libs.x86_64
python3-libselinux.x86_64
python3-libsemanage.x86_64
python3-libstoragemgmt.x86_64
python3-lockfile.noarch
python3-markupsafe.x86_64
python3-netifaces.x86_64
python3-oauthlib.noarch
python3-pip-wheel.noarch
python3-ply.noarch
python3-policycoreutils.noarch
python3-prettytable.noarch
python3-prompt-toolkit.noarch
python3-pycparser.noarch
python3-pyrsistent.x86_64
python3-pyserial.noarch
python3-pysocks.noarch
python3-pytz.noarch
python3-pyyaml.x86_64
python3-requests.noarch
python3-rpm.x86_64
python3-ruamel-yaml.x86_64
python3-ruamel-yaml-clib.x86_64
python3-setools.x86_64
python3-setuptools.noarch
python3-setuptools-wheel.noarch
python3-six.noarch
python3-urllib3.noarch
python3-wcwidth.noarch
quota.x86_64
quota-nls.noarch
readline.x86_64
rng-tools.x86_64
rootfiles.noarch
rpcbind.x86_64
rpm.x86_64
rpm-build-libs.x86_64
rpm-libs.x86_64
rpm-plugin-selinux.x86_64
rpm-plugin-systemd-inhibit.x86_64
rpm-sign-libs.x86_64
rsync.x86_64
rust-srpm-macros.noarch
screen.x86_64
sed.x86_64
selinux-policy.noarch
selinux-policy-targeted.noarch
setup.noarch
shadow-utils.x86_64
slang.x86_64
sqlite-libs.x86_64
sssd-client.x86_64
sssd-common.x86_64
sssd-kcm.x86_64
strace.x86_64
sudo.x86_64
sysctl-defaults.noarch
sysstat.x86_64
system-release.noarch
systemd.x86_64
systemd-libs.x86_64
systemd-networkd.x86_64
systemd-pam.x86_64
systemd-resolved.x86_64
systemd-udev.x86_64
systemtap-runtime.x86_64
tar.x86_64
tbb.x86_64
tcpdump.x86_64
tcsh.x86_64
time.x86_64
traceroute.x86_64
tzdata.noarch
unzip.x86_64
update-motd.noarch
userspace-rcu.x86_64
util-linux.x86_64
util-linux-core.x86_64
vim-common.x86_64
vim-data.noarch
vim-enhanced.x86_64
vim-filesystem.noarch
vim-minimal.x86_64
wget.x86_64
which.x86_64
words.noarch
xfsdump.x86_64
xfsprogs.x86_64
xxhash-libs.x86_64
xz.x86_64
xz-libs.x86_64
yum.noarch
zip.x86_64
zlib.x86_64
zstd.x86_64

1.2-1.amzn2023.0.2となっているものはdnf-plugin-release-notification.noarchでした。

インストールされているパッケージの比較

各OSの出力結果をファイルに保存してdiffします。

>  diff AL2_package.log AL2023_package.log -u -U 0
--- AL2_package.log	2023-03-22 09:09:42
+++ AL2023_package.log	2023-03-22 09:10:52
@@ -1,6 +1,3 @@
-
-$ yum list installed | awk '{print $1}'
-読み込んだプラグイン:extras_suggestions,
-インストール済みパッケージ
-GeoIP.x86_64
-PyYAML.x86_64
+$ dnf list --installed | awk '{print $1}'
+History database cannot be created, using in-memory database instead: SQLite error on "/var/lib/dnf/history.sqlite": Open failed: unable to open database file
+Installed
@@ -8,0 +6 @@
+alternatives.x86_64
@@ -10,2 +8,3 @@
-amazon-linux-extras.noarch
-amazon-linux-extras-yum-plugin.noarch
+amazon-ec2-net-utils.noarch
+amazon-linux-repo-s3.noarch
+amazon-rpm-config.noarch
@@ -17 +15,0 @@
-authconfig.x86_64
@@ -19 +17 @@
-awscli.noarch
+awscli-2.noarch
@@ -24 +21,0 @@
-bind-export-libs.x86_64
@@ -26 +22,0 @@
-bind-libs-lite.x86_64
@@ -30,2 +26 @@
-blktrace.x86_64
-boost-date-time.x86_64
+boost-filesystem.x86_64
@@ -34 +28,0 @@
-bridge-utils.x86_64
@@ -36,0 +31 @@
+c-ares.x86_64
@@ -37,0 +33 @@
+checkpolicy.x86_64
@@ -41 +37 @@
-cloud-utils-growpart.noarch
+cloud-utils-growpart.x86_64
@@ -42,0 +39 @@
+coreutils-common.x86_64
@@ -46,2 +42,0 @@
-cronie.x86_64
-cronie-anacron.x86_64
@@ -48,0 +44,2 @@
+crypto-policies.noarch
+crypto-policies-scripts.noarch
@@ -51 +48 @@
-curl.x86_64
+curl-minimal.x86_64
@@ -54,0 +52,2 @@
+dbus-broker.x86_64
+dbus-common.noarch
@@ -57,2 +55,0 @@
-device-mapper-event.x86_64
-device-mapper-event-libs.x86_64
@@ -60,4 +56,0 @@
-device-mapper-persistent-data.x86_64
-dhclient.x86_64
-dhcp-common.x86_64
-dhcp-libs.x86_64
@@ -65,3 +58,6 @@
-dmidecode.x86_64
-dmraid.x86_64
-dmraid-events.x86_64
+dnf.noarch
+dnf-data.noarch
+dnf-plugin-release-notification.noarch
+1.2-1.amzn2023.0.2
+dnf-plugin-support-info.noarch
+dnf-plugins-core.noarch
@@ -71,0 +68 @@
+dwz.x86_64
@@ -78 +74,0 @@
-ec2-net-utils.noarch
@@ -80,0 +77,3 @@
+efi-filesystem.noarch
+efi-srpm-macros.noarch
+elfutils-debuginfod-client.x86_64
@@ -90,3 +89,2 @@
-fipscheck.x86_64
-fipscheck-lib.x86_64
-freetype.x86_64
+fonts-srpm-macros.noarch
+fstrm.x86_64
@@ -95 +93 @@
-gdbm.x86_64
+gdbm-libs.x86_64
@@ -97 +94,0 @@
-generic-logos.noarch
@@ -99,0 +97 @@
+ghc-srpm-macros.noarch
@@ -103,0 +102 @@
+glibc-gconv-extra.x86_64
@@ -105 +103,0 @@
-glibc-minimal-langpack.x86_64
@@ -107 +105,3 @@
-gnupg2.x86_64
+gnupg2-minimal.x86_64
+gnutls.x86_64
+go-srpm-macros.noarch
@@ -112 +111,0 @@
-grub2.x86_64
@@ -115 +113,0 @@
-grub2-pc.x86_64
@@ -122,2 +119,0 @@
-hardlink.x86_64
-hibagent.noarch
@@ -129 +125,2 @@
-hwdata.x86_64
+hunspell-filesystem.x86_64
+hwdata.noarch
@@ -130,0 +128 @@
+inih.x86_64
@@ -133,2 +130,0 @@
-iptables.x86_64
-iptables-libs.x86_64
@@ -138 +134 @@
-jbigkit-libs.x86_64
+jitterentropy.x86_64
@@ -141 +136,0 @@
-kbd-legacy.noarch
@@ -143,0 +139,2 @@
+kernel-livepatch-repo-s3.noarch
+kernel-srpm-macros.noarch
@@ -149 +145,0 @@
-kpartx.x86_64
@@ -152,3 +147,0 @@
-langtable.noarch
-langtable-data.noarch
-langtable-python.noarch
@@ -157,0 +151,2 @@
+libarchive.x86_64
+libargon2.x86_64
@@ -163,0 +159 @@
+libcbor.x86_64
@@ -165,0 +162 @@
+libcomps.x86_64
@@ -167,4 +164 @@
-libcroco.x86_64
-libcrypt.x86_64
-libcurl.x86_64
-libdaemon.x86_64
+libcurl-minimal.x86_64
@@ -172,3 +166,3 @@
-libdb-utils.x86_64
-libdrm.x86_64
-libdwarf.x86_64
+libdhash.x86_64
+libdnf.x86_64
+libeconf.x86_64
@@ -176 +170 @@
-libestr.x86_64
+libev.x86_64
@@ -178 +171,0 @@
-libfastjson.x86_64
@@ -180,0 +174 @@
+libfido2.x86_64
@@ -185,2 +179 @@
-libicu.x86_64
-libidn.x86_64
+libibverbs.x86_64
@@ -189 +182,4 @@
-libjpeg-turbo.x86_64
+libkcapi.x86_64
+libkcapi-hmaccalc.x86_64
+libldb.x86_64
+libmaxminddb.x86_64
@@ -191,0 +188 @@
+libmodulemd.x86_64
@@ -193,2 +189,0 @@
-libnetfilter_conntrack.x86_64
-libnfnetlink.x86_64
@@ -198 +192,0 @@
-libnl3-cli.x86_64
@@ -201 +194,0 @@
-libpciaccess.x86_64
@@ -203 +196,2 @@
-libpng.x86_64
+libpkgconf.x86_64
+libpsl.x86_64
@@ -205,0 +200,2 @@
+librepo.x86_64
+libreport-filesystem.noarch
@@ -210,0 +207 @@
+libsigsegv.x86_64
@@ -211,0 +209 @@
+libsolv.x86_64
@@ -213 +211 @@
-libssh2.x86_64
+libsss_certmap.x86_64
@@ -218,3 +216 @@
-libstoragemgmt-python.noarch
-libstoragemgmt-python-clibs.x86_64
-libsysfs.x86_64
+libtalloc.x86_64
@@ -222,2 +218,3 @@
-libteam.x86_64
-libtiff.x86_64
+libtdb.x86_64
+libtevent.x86_64
+libtextstyle.x86_64
@@ -228,0 +226 @@
+libuv.x86_64
@@ -230,2 +228,2 @@
-libverto-libevent.x86_64
-libwebp.x86_64
+libverto-libev.x86_64
+libxcrypt.x86_64
@@ -233 +230,0 @@
-libxml2-python.x86_64
@@ -234,0 +232 @@
+libzstd.x86_64
@@ -235,0 +234 @@
+lmdb-libs.x86_64
@@ -238,5 +237,3 @@
-lua.x86_64
-lvm2.x86_64
-lvm2-libs.x86_64
-lz4.x86_64
-make.x86_64
+lua-libs.x86_64
+lua-srpm-macros.noarch
+lz4-libs.x86_64
@@ -245,3 +241,0 @@
-man-pages-overrides.x86_64
-mariadb-libs.x86_64
-mdadm.x86_64
@@ -249,2 +243 @@
-mlocate.x86_64
-mtr.x86_64
+mpfr.x86_64
@@ -258 +250,0 @@
-newt-python.x86_64
@@ -259,0 +252 @@
+npth.x86_64
@@ -262 +254,0 @@
-nss-pem.x86_64
@@ -266 +257,0 @@
-nss-tools.x86_64
@@ -269,0 +261,2 @@
+ocaml-srpm-macros.noarch
+openblas-srpm-macros.noarch
@@ -275,0 +269 @@
+openssl-pkcs11.x86_64
@@ -278,0 +273 @@
+package-notes-srpm-macros.noarch
@@ -284 +278,0 @@
-pcre.x86_64
@@ -286 +280 @@
-perl.x86_64
+pcre2-syntax.noarch
@@ -287,0 +282,2 @@
+perl-Class-Struct.noarch
+perl-DynaLoader.x86_64
@@ -288,0 +285 @@
+perl-Errno.x86_64
@@ -289,0 +287,2 @@
+perl-Fcntl.x86_64
+perl-File-Basename.noarch
@@ -292 +291 @@
-perl-Filter.x86_64
+perl-File-stat.noarch
@@ -293,0 +293 @@
+perl-Getopt-Std.noarch
@@ -294,0 +295,4 @@
+perl-IO.x86_64
+perl-IPC-Open3.noarch
+perl-MIME-Base64.x86_64
+perl-POSIX.x86_64
@@ -300,0 +305 @@
+perl-SelectSaver.noarch
@@ -302,0 +308,3 @@
+perl-Symbol.noarch
+perl-Term-ANSIColor.noarch
+perl-Term-Cap.noarch
@@ -304 +312 @@
-perl-Time-HiRes.x86_64
+perl-Text-Tabs+Wrap.noarch
@@ -306,0 +315,2 @@
+perl-if.noarch
+perl-interpreter.x86_64
@@ -308 +318,3 @@
-perl-macros.x86_64
+perl-mro.x86_64
+perl-overload.noarch
+perl-overloading.noarch
@@ -311,8 +323,6 @@
-perl-threads.x86_64
-perl-threads-shared.x86_64
-pinentry.x86_64
-pkgconfig.x86_64
-plymouth.x86_64
-plymouth-core-libs.x86_64
-plymouth-scripts.x86_64
-pm-utils.x86_64
+perl-srpm-macros.noarch
+perl-subs.noarch
+perl-vars.noarch
+pkgconf.x86_64
+pkgconf-m4.noarch
+pkgconf-pkg-config.x86_64
@@ -319,0 +330 @@
+policycoreutils-python-utils.noarch
@@ -321 +331,0 @@
-postfix.x86_64
@@ -322,0 +333 @@
+protobuf-c.x86_64
@@ -325,50 +336,3 @@
-pth.x86_64
-pygpgme.x86_64
-pyliblzma.x86_64
-pystache.noarch
-python.x86_64
-python-babel.noarch
-python-backports.x86_64
-python-backports-ssl_match_hostname.noarch
-3.5.0.1-1.amzn2
-python-cffi.x86_64
-python-chardet.noarch
-python-configobj.noarch
-python-daemon.noarch
-python-devel.x86_64
-python-docutils.noarch
-python-enum34.noarch
-python-idna.noarch
-python-iniparse.noarch
-python-ipaddress.noarch
-python-jinja2.noarch
-python-jsonpatch.noarch
-python-jsonpointer.noarch
-python-jwcrypto.noarch
-python-kitchen.noarch
-python-libs.x86_64
-python-lockfile.noarch
-python-markupsafe.x86_64
-python-pillow.x86_64
-python-ply.noarch
-python-pycparser.noarch
-python-pycurl.x86_64
-python-repoze-lru.noarch
-python-requests.noarch
-python-simplejson.x86_64
-python-urlgrabber.noarch
-python-urllib3.noarch
-python2-botocore.noarch
-python2-colorama.noarch
-python2-cryptography.x86_64
-python2-dateutil.noarch
-python2-futures.noarch
-python2-jmespath.noarch
-python2-jsonschema.noarch
-python2-oauthlib.noarch
-python2-pyasn1.noarch
-python2-rpm.x86_64
-python2-rsa.noarch
-python2-s3transfer.noarch
-python2-setuptools.noarch
-python2-six.noarch
+publicsuffix-list-dafsa.noarch
+python-chevron.x86_64
+python-srpm-macros.noarch
@@ -375,0 +340,9 @@
+python3-attrs.noarch
+python3-audit.x86_64
+python3-awscrt.x86_64
+python3-babel.noarch
+python3-cffi.x86_64
+python3-chardet.noarch
+python3-colorama.noarch
+python3-configobj.noarch
+python3-cryptography.x86_64
@@ -376,0 +350,5 @@
+python3-dateutil.noarch
+python3-dbus.x86_64
+python3-distro.noarch
+python3-dnf.noarch
+python3-dnf-plugins-core.noarch
@@ -377,0 +356,10 @@
+python3-gpg.x86_64
+python3-hawkey.x86_64
+python3-idna.noarch
+python3-jinja2.noarch
+python3-jmespath.noarch
+python3-jsonpatch.noarch
+python3-jsonpointer.noarch
+python3-jsonschema.noarch
+python3-libcomps.x86_64
+python3-libdnf.x86_64
@@ -378,0 +367,3 @@
+python3-libselinux.x86_64
+python3-libsemanage.x86_64
+python3-libstoragemgmt.x86_64
@@ -380,2 +371,19 @@
-python3-pip.noarch
-python3-pystache.noarch
+python3-markupsafe.x86_64
+python3-netifaces.x86_64
+python3-oauthlib.noarch
+python3-pip-wheel.noarch
+python3-ply.noarch
+python3-policycoreutils.noarch
+python3-prettytable.noarch
+python3-prompt-toolkit.noarch
+python3-pycparser.noarch
+python3-pyrsistent.x86_64
+python3-pyserial.noarch
+python3-pysocks.noarch
+python3-pytz.noarch
+python3-pyyaml.x86_64
+python3-requests.noarch
+python3-rpm.x86_64
+python3-ruamel-yaml.x86_64
+python3-ruamel-yaml-clib.x86_64
+python3-setools.x86_64
@@ -383,3 +391,4 @@
-python3-simplejson.x86_64
-pyxattr.x86_64
-qrencode-libs.x86_64
+python3-setuptools-wheel.noarch
+python3-six.noarch
+python3-urllib3.noarch
+python3-wcwidth.noarch
@@ -388 +396,0 @@
-rdate.x86_64
@@ -395,0 +404 @@
+rpm-plugin-selinux.x86_64
@@ -396,0 +406 @@
+rpm-sign-libs.x86_64
@@ -398,2 +408 @@
-rsyslog.x86_64
-scl-utils.x86_64
+rust-srpm-macros.noarch
@@ -401 +409,0 @@
-installed
@@ -405 +412,0 @@
-setserial.x86_64
@@ -407,2 +413,0 @@
-setuptool.x86_64
-sgpio.x86_64
@@ -410 +414,0 @@
-shared-mime-info.x86_64
@@ -412 +416 @@
-sqlite.x86_64
+sqlite-libs.x86_64
@@ -413,0 +418,2 @@
+sssd-common.x86_64
+sssd-kcm.x86_64
@@ -418 +424 @@
-system-release.x86_64
+system-release.noarch
@@ -421 +427,4 @@
-systemd-sysv.x86_64
+systemd-networkd.x86_64
+systemd-pam.x86_64
+systemd-resolved.x86_64
+systemd-udev.x86_64
@@ -423 +431,0 @@
-sysvinit-tools.x86_64
@@ -425,2 +433 @@
-tcp_wrappers.x86_64
-tcp_wrappers-libs.x86_64
+tbb.x86_64
@@ -429 +435,0 @@
-teamd.x86_64
@@ -435,2 +441 @@
-usermode.x86_64
-ustr.x86_64
+userspace-rcu.x86_64
@@ -437,0 +443 @@
+util-linux-core.x86_64
@@ -443 +448,0 @@
-virt-what.x86_64
@@ -448,0 +454 @@
+xxhash-libs.x86_64
@@ -451 +456,0 @@
-yajl.x86_64
@@ -453,4 +457,0 @@
-yum-langpacks.noarch
-yum-metadata-parser.x86_64
-yum-plugin-priorities.noarch
-yum-utils.noarch
@@ -458 +459,2 @@
-zlib.x86_64
\ No newline at end of file
+zlib.x86_64
+zstd.x86_64
\ No newline at end of file

ec2-net-utils.noarchamazon-ec2-net-utils.noarchとパッケージ名が変わったり、cloud-utils-growpart.noarchcloud-utils-growpart.x86_64とアーキテクチャーの指定が入ったりと、完全に異なるパッケージの差分となってはいないのでご注意ください。

AWS CLIがv2になっているのがありがたいですね。

また、気になるところとしてはiptablesがインストールされていないようです。OS上でフィルタリングしたい場合はnftablesを使うと良いでしょう。

makeもAmazon Linux 2023にインストールされていないためソースファイルをコンパイルしたい場合は事前にmakeをインストールする必要があります。

EC2インスタンス上でLVMを使うことも少ないと思いますが、LVMを使う場合はlvm2をインストールしてください。

Amazon Linux 2023を使う場合はどのようなパッケージがインストールされているか把握しよう

Amazon Linux 2023とAmazon Linux2のデフォルトで起動しているサービスやインストールされているパッケージを比較してみました。

かなり差分があるのでAmazon Linux 2023を使う場合はどのようなパッケージがインストールされているか、サービスが起動しているのか事前に把握しておきましょう。

この記事が誰かの助けになれば幸いです。

以上、AWS事業本部 コンサルティング部の のんピ(@non____97)でした!

Share this article

facebook logohatena logotwitter logo

© Classmethod, Inc. All rights reserved.